 package tools.packet;

 import client.MapleBuffStat;
 import client.MapleCharacter;
 import client.MapleDisease;
 import client.skills.SpecialBuffInfo;
 import constants.GameConstants;
 import constants.JobConstants;
 import constants.SkillConstants;
 import handling.Buffstat;
 import handling.opcode.SendPacketOpcode;
 import java.awt.Rectangle;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.EnumMap;
 import java.util.List;
 import java.util.Map;
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
 import server.MapleStatEffect;
 import server.maps.MapleArrowsTurret;
 import tools.DateUtil;
 import tools.MaplePacketCreator;
 import tools.Pair;
 import tools.Randomizer;
 import tools.data.output.MaplePacketLittleEndianWriter;









 public class BuffPacket
 {
/*   39 */   private static final Logger log = LogManager.getLogger(BuffPacket.class);


   public static byte[] giveBuff(int buffid, int bufflength, Map<MapleBuffStat, Integer> statups, MapleStatEffect effect, MapleCharacter chr) {
/*   43 */     log.debug("调用");
/*   44 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/*   46 */     mplew.writeShort(SendPacketOpcode.GIVE_BUFF.getValue());
/*   47 */     mplew.writeInt(0);
/*   48 */     mplew.writeInt(0);
/*   49 */     writeBuffMask(mplew, statups);
/*   50 */     boolean isWriteIntValue = false;
/*   51 */     for (Map.Entry<MapleBuffStat, Integer> entry : statups.entrySet()) {
/*   52 */       if (SkillConstants.isWriteBuffIntValue(entry.getKey())) {
/*   53 */         isWriteIntValue = true;
       }
     }
/*   56 */     for (Map.Entry<MapleBuffStat, Integer> entry : statups.entrySet()) {
/*   57 */       SpecialBuffInfo stackBuffInfo = chr.getStackBuffInfo(entry.getKey(), buffid);
/*   58 */       if (!((MapleBuffStat)entry.getKey()).canStack()) {
/*   59 */         if (isWriteIntValue) {
/*   60 */           mplew.writeInt((stackBuffInfo != null) ? stackBuffInfo.value : ((Integer)entry.getValue()).intValue());
         } else {
/*   62 */           mplew.writeShort((stackBuffInfo != null) ? stackBuffInfo.value : ((entry.getKey() == MapleBuffStat.SECONDARY_STAT_MobZoneState) ? 1 : ((Integer)entry.getValue()).intValue()));
         }
/*   64 */         mplew.writeInt((entry.getKey() == MapleBuffStat.祝福之锤) ? 400011052 : ((entry.getKey() == MapleBuffStat.万佛归一破_点数) ? chr.getLastSkill() : ((stackBuffInfo != null) ? stackBuffInfo.buffid : buffid)));


/*   67 */         int time = (entry.getKey() == MapleBuffStat.祝福之锤) ? 0 : ((entry.getKey() == MapleBuffStat.万佛归一破_点数) ? 0 : ((stackBuffInfo != null) ? stackBuffInfo.bufflength : bufflength));


/*   70 */         mplew.writeInt((time == 2100000000) ? -1 : time);
       }
     }

/*   74 */     for (Map.Entry<MapleBuffStat, Integer> entry : statups.entrySet()) {
/*   75 */       if (SkillConstants.f(entry.getKey()) && !((MapleBuffStat)entry.getKey()).canStack()) {
/*   76 */         if (isWriteIntValue) {
/*   77 */           mplew.writeInt(((Integer)entry.getValue()).intValue());
         } else {
/*   79 */           mplew.writeShort(((Integer)entry.getValue()).intValue());
         }
/*   81 */         mplew.writeInt(buffid);
/*   82 */         mplew.writeInt(bufflength);
       }
     }

/*   86 */     writeBuffData(mplew, statups, effect, chr);

/*   88 */     for (Map.Entry<MapleBuffStat, Integer> entry : statups.entrySet()) {
/*   89 */       if (((MapleBuffStat)entry.getKey()).canStack() && SkillConstants.isWriteBuffIntValue(entry.getKey())) {
/*   90 */         mplew.writeInt(((Integer)entry.getValue()).intValue());
/*   91 */         mplew.writeInt(buffid);
/*   92 */         mplew.write(1);
/*   93 */         mplew.writeInt(2);
/*   94 */         if (entry.getKey() == MapleBuffStat.极速领域) {
/*   95 */           mplew.write(1);
/*   96 */           mplew.writeInt(2);
/*   97 */           mplew.writeShort(104);
           continue;
         }
/*  100 */         if (entry.getKey() == MapleBuffStat.SECONDARY_STAT_RideVehicleExpire) {
/*  101 */           mplew.writeShort(10);
         }
       }
     }
/*  105 */     for (Map.Entry<MapleBuffStat, Integer> entry : statups.entrySet()) {
/*  106 */       if (((MapleBuffStat)entry.getKey()).canStack() && !SkillConstants.isWriteBuffIntValue(entry.getKey())) {
/*  107 */         List<SpecialBuffInfo> specialBuffInfo = chr.getSpecialBuffInfo(entry.getKey());
/*  108 */         mplew.writeInt(specialBuffInfo.size());
/*  109 */         specialBuffInfo.forEach(specialBuffInfo1 -> {
               mplew.writeInt(specialBuffInfo1.buffid);

               mplew.writeInt(specialBuffInfo1.value);
               mplew.writeInt((int)specialBuffInfo1.time);
               mplew.writeInt(0);
               mplew.writeInt(specialBuffInfo1.bufflength);
               int n6 = 0;
               mplew.writeInt(n6);
               mplew.writeInt(0);
               for (int i2 = 0; i2 < n6; i2++) {
                 mplew.writeInt(0);
                 mplew.writeInt(0);
               }
             });
       }
     }
/*  126 */     statups.containsKey(MapleBuffStat.隐身术);
/*  127 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK486)) {
/*  128 */       mplew.writeInt(0);
/*  129 */       mplew.writeInt(0);
     }
/*  131 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK522)) {
/*  132 */       mplew.writeInt(0);
     }
/*  134 */     if (statups.containsKey(MapleBuffStat.荣耀之翼)) {
/*  135 */       mplew.writeInt(chr.getBuffedSkill_X(MapleBuffStat.荣耀之翼).intValue());
/*  136 */       mplew.writeInt(chr.getBuffedSkill_X(MapleBuffStat.荣耀之翼).intValue());
     }
/*  138 */     if (statups.containsKey(MapleBuffStat.祝福标记)) {
/*  139 */       mplew.writeInt(0);
/*  140 */       mplew.writeInt(0);
     }
/*  142 */     statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK542);
/*  143 */     if (statups.containsKey(MapleBuffStat.飞行骑乘)) {
/*  144 */       mplew.writeInt(0);
     }
/*  146 */     statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK638);
/*  147 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK639)) {
/*  148 */       mplew.write(0);
     }
/*  150 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_ReduceMana)) {
/*  151 */       mplew.writeInt(0);
/*  152 */       mplew.writeInt(0);
/*  153 */       mplew.writeInt(0);
     }
/*  155 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK641)) {
/*  156 */       mplew.writeInt(0);
/*  157 */       mplew.writeInt(0);
/*  158 */       mplew.writeInt(0);
     }
/*  160 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK642)) {
/*  161 */       mplew.writeInt(0);
/*  162 */       mplew.writeInt(0);
/*  163 */       mplew.writeInt(0);
     }
/*  165 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK525)) {
/*  166 */       mplew.writeInt(0);
     }
/*  168 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK643)) {
/*  169 */       mplew.writeInt(0);
/*  170 */       mplew.writeInt(0);
/*  171 */       mplew.writeInt(0);
/*  172 */       mplew.writeInt(0);
     }
/*  174 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK644)) {
/*  175 */       mplew.writeInt(0);
/*  176 */       mplew.writeInt(0);
/*  177 */       mplew.writeInt(0);
     }
/*  179 */     if (statups.containsKey(MapleBuffStat.武器多样化)) {
/*  180 */       mplew.writeInt(0);
     }

/*  183 */     if (statups.containsKey(MapleBuffStat.过载模式)) {
/*  184 */       mplew.writeInt(0);
     }

/*  187 */     if (statups.containsKey(MapleBuffStat.神圣魔法盾)) {
/*  188 */       mplew.writeInt(10);
     }
/*  190 */     if (statups.containsKey(MapleBuffStat.忍耐之盾)) {
/*  191 */       mplew.writeInt(0);
     }
/*  193 */     if (statups.containsKey(MapleBuffStat.神圣祈祷)) {
/*  194 */       mplew.writeInt(0);
/*  195 */       mplew.writeInt(20);
/*  196 */       mplew.writeInt(1);
     }
/*  198 */     if (statups.containsKey(MapleBuffStat.斗气集中)) {
/*  199 */       mplew.writeInt(0);
     }
/*  201 */     if (statups.containsKey(MapleBuffStat.神圣保护)) {
/*  202 */       mplew.writeInt(0);
     }





/*  209 */     mplew.writeShort(0);
/*  210 */     mplew.write(0);
/*  211 */     mplew.write(0);
/*  212 */     mplew.write(1);
/*  213 */     for (Map.Entry<MapleBuffStat, Integer> entry : statups.entrySet()) {
/*  214 */       if (SkillConstants.isWriteBuffByteData(entry.getKey())) {
/*  215 */         mplew.write(0);
       }
     }
/*  218 */     mplew.writeInt(0);

/*  220 */     if (statups.containsKey(MapleBuffStat.神圣祈祷)) {
/*  221 */       mplew.writeZeroBytes(6);
     }
/*  223 */     return mplew.getPacket();
   }











   public static byte[] giveDice(int buffid, int skillid, int duration, Map<MapleBuffStat, Integer> statups) {
/*  237 */     log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
/*  238 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/*  240 */     mplew.writeShort(SendPacketOpcode.GIVE_BUFF.getValue());
/*  241 */     mplew.writeInt(0);
/*  242 */     mplew.writeInt(0);
/*  243 */     writeBuffMask(mplew, statups);

/*  245 */     int dice = (buffid >= 100) ? (buffid / 100) : buffid;
/*  246 */     mplew.writeShort(dice);

/*  248 */     mplew.writeInt(skillid);
/*  249 */     mplew.writeInt(duration);
/*  250 */     mplew.writeZeroBytes(5);


/*  253 */     mplew.writeInt(0);
/*  254 */     mplew.writeInt(GameConstants.getDiceStat(dice, 3));
/*  255 */     mplew.writeInt(GameConstants.getDiceStat(dice, 3));


/*  258 */     mplew.writeInt(GameConstants.getDiceStat(dice, 4));
/*  259 */     mplew.writeInt(0);

/*  261 */     mplew.writeInt(0);
/*  262 */     mplew.writeInt(0);
/*  263 */     mplew.writeInt(0);


/*  266 */     mplew.writeInt(0);
/*  267 */     mplew.writeInt(GameConstants.getDiceStat(dice, 2));

/*  269 */     mplew.writeInt(0);
/*  270 */     mplew.writeInt(0);


/*  273 */     mplew.writeInt(0);
/*  274 */     mplew.writeInt(GameConstants.getDiceStat(dice, 5));


/*  277 */     mplew.writeZeroBytes(16);
/*  278 */     mplew.writeInt(GameConstants.getDiceStat(dice, 6));

/*  280 */     mplew.writeZeroBytes(24);
/*  281 */     mplew.write(1);
/*  282 */     mplew.writeInt(0);
/*  283 */     return mplew.getPacket();
   }










   public static byte[] showMonsterRiding(int chrId, List<Pair<MapleBuffStat, Integer>> statups, int itemId, int skillId) {
/*  296 */     log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
/*  297 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/*  299 */     mplew.writeShort(SendPacketOpcode.GIVE_FOREIGN_BUFF.getValue());
/*  300 */     mplew.writeInt(chrId);
/*  301 */     writeBuffMask(mplew, statups);
/*  302 */     mplew.writeZeroBytes(23);
/*  303 */     mplew.writeInt(0);
/*  304 */     mplew.writeInt(itemId);
/*  305 */     mplew.writeInt(skillId);
/*  306 */     mplew.writeInt(0);
/*  307 */     mplew.write(1);
/*  308 */     mplew.write(0);
/*  309 */     mplew.write(4);
/*  310 */     mplew.write(0);
/*  311 */     mplew.write(0);

/*  313 */     return mplew.getPacket();
   }









   public static byte[] givePirateBuff(Map<MapleBuffStat, Integer> statups, int duration, int skillid) {
/*  325 */     boolean infusion = (skillid == 5121009 || skillid == 15121005 || skillid % 10000 == 8006);
/*  326 */     log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
/*  327 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/*  329 */     mplew.writeShort(SendPacketOpcode.GIVE_BUFF.getValue());
/*  330 */     mplew.writeInt(0);
/*  331 */     mplew.writeInt(0);
/*  332 */     writeBuffMask(mplew, statups);
/*  333 */     mplew.writeZeroBytes(9);
/*  334 */     statups.forEach((left, right) -> {
           mplew.writeInt(right.intValue());
           mplew.writeLong(skillid);
           mplew.writeZeroBytes(infusion ? 6 : 1);
           mplew.writeShort(duration);
         });
/*  340 */     mplew.writeInt(infusion ? 600 : 0);
/*  341 */     mplew.write(1);
/*  342 */     if (!infusion) {
/*  343 */       mplew.write(4);
     }
/*  345 */     mplew.writeInt(0);
/*  346 */     mplew.writeInt(0);
/*  347 */     return mplew.getPacket();
   }

































   public static byte[] give导航辅助(int skillid, int mobid, int x) {
/*  383 */     log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
/*  384 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/*  386 */     mplew.writeShort(SendPacketOpcode.GIVE_BUFF.getValue());
/*  387 */     mplew.writeInt(0);
/*  388 */     mplew.writeInt(0);
/*  389 */     writeSingleMask(mplew, MapleBuffStat.导航辅助);
/*  390 */     mplew.writeZeroBytes(9);
/*  391 */     mplew.writeInt(x);
/*  392 */     mplew.writeInt(skillid);
/*  393 */     mplew.writeZeroBytes(5);
/*  394 */     mplew.writeInt(mobid);
/*  395 */     mplew.writeInt(0);
/*  396 */     mplew.writeInt(720);
/*  397 */     mplew.writeZeroBytes(5);
/*  398 */     mplew.writeInt(0);
/*  399 */     return mplew.getPacket();
   }




   public static byte[] give神秘瞄准术(int x, int skillId, int duration) {
/*  406 */     log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
/*  407 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/*  409 */     mplew.writeShort(SendPacketOpcode.GIVE_BUFF.getValue());
/*  410 */     mplew.writeInt(0);
/*  411 */     mplew.writeInt(0);
/*  412 */     writeSingleMask(mplew, MapleBuffStat.神秘瞄准术);
/*  413 */     mplew.writeShort(x);
/*  414 */     mplew.writeInt(skillId);
/*  415 */     mplew.writeInt(duration);
/*  416 */     mplew.writeZeroBytes(18);
/*  417 */     mplew.writeInt(0);
/*  418 */     return mplew.getPacket();
   }




   public static byte[] giveEnergyCharge(int bar, int buffId, boolean fullbar, boolean consume) {
/*  425 */     log.debug("调用");
/*  426 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/*  428 */     mplew.writeShort(SendPacketOpcode.GIVE_BUFF.getValue());
/*  429 */     mplew.writeInt(0);
/*  430 */     mplew.writeInt(0);
/*  431 */     writeSingleMask(mplew, MapleBuffStat.能量获得);
/*  432 */     mplew.writeZeroBytes(5);
/*  433 */     mplew.writeInt(0);
/*  434 */     mplew.writeInt((fullbar || (consume && bar > 0)) ? buffId : 0);
/*  435 */     mplew.writeInt(Math.min(bar, 10000));
/*  436 */     mplew.writeInt(buffId);
/*  437 */     mplew.writeInt(0);
/*  438 */     mplew.writeInt(0);
/*  439 */     mplew.write(0);
/*  440 */     mplew.writeInt(1);
/*  441 */     mplew.writeShort(0);
/*  442 */     return mplew.getPacket();
   }




   public static byte[] showEnergyCharge(int chrId, int bar, int buffId, boolean fullbar, boolean consume) {
/*  449 */     log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
/*  450 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/*  452 */     mplew.writeShort(SendPacketOpcode.GIVE_FOREIGN_BUFF.getValue());
/*  453 */     mplew.writeInt(chrId);
/*  454 */     writeSingleMask(mplew, MapleBuffStat.能量获得);

/*  456 */     mplew.writeInt(0);
/*  457 */     mplew.writeZeroBytes(3);
/*  458 */     mplew.writeInt((fullbar || (consume && bar > 0)) ? buffId : 0);
/*  459 */     mplew.writeInt(0);
/*  460 */     mplew.writeInt(0);
/*  461 */     mplew.writeInt(0);
/*  462 */     mplew.writeInt(0);
/*  463 */     mplew.writeInt(Math.min(bar, 10000));

/*  465 */     mplew.writeInt(0);
/*  466 */     mplew.write(1);
/*  467 */     mplew.writeInt(1);
/*  468 */     mplew.write(0);
/*  469 */     mplew.writeShort(0);
/*  470 */     mplew.write(1);
/*  471 */     return mplew.getPacket();
   }




   public static byte[] updateLuminousGauge(int points, byte type) {
/*  478 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/*  480 */     mplew.writeShort(SendPacketOpcode.LUMINOUS_COMBO.getValue());
/*  481 */     mplew.writeInt(points);
/*  482 */     mplew.write(type);

/*  484 */     return mplew.getPacket();
   }




   public static byte[] startPower() {
/*  491 */     log.debug("调用");
/*  492 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/*  494 */     mplew.writeShort(SendPacketOpcode.GIVE_BUFF.getValue());
/*  495 */     mplew.writeInt(0);
/*  496 */     mplew.writeInt(0);
/*  497 */     writeSingleMask(mplew, MapleBuffStat.尖兵电力);
/*  498 */     mplew.writeShort(1);
/*  499 */     mplew.writeInt(1);
/*  500 */     mplew.writeZeroBytes(9);
/*  501 */     mplew.writeInt(3);
/*  502 */     mplew.writeZeroBytes(12);
/*  503 */     mplew.writeInt(4);
/*  504 */     return mplew.getPacket();
   }




   public static byte[] updatePowerCount(int skillId, int count) {
/*  511 */     log.debug("调用");
/*  512 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/*  514 */     mplew.writeShort(SendPacketOpcode.GIVE_BUFF.getValue());
/*  515 */     mplew.writeInt(0);
/*  516 */     mplew.writeInt(0);
/*  517 */     writeSingleMask(mplew, MapleBuffStat.尖兵电力);
/*  518 */     mplew.writeShort(count);
/*  519 */     mplew.writeInt(skillId);
/*  520 */     mplew.writeInt(0);
/*  521 */     mplew.writeZeroBytes(18);
/*  522 */     mplew.writeInt(0);
/*  523 */     return mplew.getPacket();
   }




   public static byte[] give卡牌审判(int buffid, int bufflength, Map<MapleBuffStat, Integer> statups, int theStat) {
/*  530 */     log.debug("调用");
/*  531 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/*  533 */     mplew.writeShort(SendPacketOpcode.GIVE_BUFF.getValue());
/*  534 */     mplew.writeInt(0);
/*  535 */     mplew.writeInt(0);
/*  536 */     writeBuffMask(mplew, statups);
/*  537 */     statups.forEach((left, right) -> {
           mplew.writeShort(right.intValue());
           mplew.writeInt(buffid);
           mplew.writeInt(bufflength);
         });
/*  542 */     mplew.writeZeroBytes(5);
/*  543 */     mplew.writeInt(0);
/*  544 */     mplew.writeInt(theStat);
/*  545 */     mplew.writeZeroBytes(8);
/*  546 */     mplew.writeInt(1);
/*  547 */     mplew.write(0);
/*  548 */     return mplew.getPacket();
   }

   public static byte[] give狂龙变形值(int bar) {
/*  552 */     log.debug("调用");
/*  553 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/*  555 */     mplew.writeShort(SendPacketOpcode.GIVE_BUFF.getValue());
/*  556 */     mplew.writeInt(0);
/*  557 */     mplew.writeInt(0);
/*  558 */     writeSingleMask(mplew, MapleBuffStat.变形值);
/*  559 */     mplew.writeInt(Math.min(bar, 700));
/*  560 */     mplew.writeShort(0);
/*  561 */     mplew.writeZeroBytes(13);
/*  562 */     mplew.writeInt((bar >= 700) ? 3 : ((bar >= 300) ? 2 : ((bar >= 100) ? 1 : 0)));
/*  563 */     mplew.writeInt(0);

/*  565 */     mplew.writeInt((int)PacketHelper.getTime(System.currentTimeMillis()));
/*  566 */     mplew.writeZeroBytes(5);
/*  567 */     mplew.writeInt(0);
/*  568 */     mplew.writeInt(0);
/*  569 */     return mplew.getPacket();
   }

   public static byte[] show狂龙变形值(int chrId, int bar) {
/*  573 */     log.debug("调用");
/*  574 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/*  576 */     mplew.writeShort(SendPacketOpcode.GIVE_FOREIGN_BUFF.getValue());
/*  577 */     mplew.writeInt(chrId);
/*  578 */     writeSingleMask(mplew, MapleBuffStat.变形值);
/*  579 */     mplew.writeInt(Math.min(bar, 1000));
/*  580 */     mplew.writeZeroBytes(27);
/*  581 */     mplew.write(0);
/*  582 */     mplew.writeInt(0);
/*  583 */     mplew.writeInt(0);
/*  584 */     mplew.writeInt(0);
/*  585 */     return mplew.getPacket();
   }

   public static byte[] showPP(int pp, int job) {
/*  589 */     log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
/*  590 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/*  592 */     mplew.writeShort(SendPacketOpcode.GIVE_BUFF.getValue());
/*  593 */     mplew.writeInt(0);
/*  594 */     mplew.writeInt(0);
/*  595 */     writeSingleMask(mplew, MapleBuffStat.PP);
/*  596 */     mplew.writeShort(pp);
/*  597 */     mplew.writeInt(job);
/*  598 */     mplew.writeZeroBytes(22);
/*  599 */     mplew.writeInt(0);
/*  600 */     return mplew.getPacket();
   }



   public static byte[] show隐藏碎片(int buffid, int skilllevel, List<Pair<MapleBuffStat, Integer>> statups) {
/*  606 */     log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
/*  607 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/*  609 */     mplew.writeShort(SendPacketOpcode.GIVE_BUFF.getValue());
/*  610 */     mplew.writeInt(0);
/*  611 */     mplew.writeInt(0);
/*  612 */     writeBuffMask(mplew, statups);
/*  613 */     mplew.writeShort(2881);
/*  614 */     mplew.writeInt(30000227);
/*  615 */     mplew.writeZeroBytes(13);
/*  616 */     mplew.writeInt(2);
/*  617 */     mplew.writeInt(30000227);
/*  618 */     mplew.writeInt(10);
/*  619 */     long time = DateUtil.getTime(System.currentTimeMillis());
/*  620 */     mplew.writeInt(DateUtil.getSpecialNowiTime());
/*  621 */     mplew.writeInt(DateUtil.getSpecialNowiTime());
/*  622 */     mplew.writeLong(0L);

/*  624 */     mplew.writeInt(buffid);
/*  625 */     mplew.writeInt(skilllevel);
/*  626 */     mplew.writeLong(time);
/*  627 */     mplew.writeInt(0);

/*  629 */     for (int i = 0; i < 2; i++) {
/*  630 */       mplew.writeHexString("01 00 00 00 63 C4 C9 01 0A 00 00 00");
/*  631 */       mplew.writeLong(time);
/*  632 */       mplew.writeInt(0);
/*  633 */       mplew.writeInt(0);
     }
/*  635 */     mplew.writeHexString("00 00 00 00 01 00 00 00 00");
/*  636 */     mplew.writeInt(0);
/*  637 */     return mplew.getPacket();
   }

   public static byte[] giveSoulGauge(int count, int skillid) {
/*  641 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
/*  642 */     log.debug("调用");
/*  643 */     mplew.writeShort(SendPacketOpcode.GIVE_BUFF.getValue());
/*  644 */     mplew.writeInt(0);
/*  645 */     mplew.writeInt(0);
/*  646 */     writeSingleMask(mplew, MapleBuffStat.灵魂武器点数);
/*  647 */     mplew.writeShort(count);
/*  648 */     mplew.writeInt(skillid);
/*  649 */     mplew.writeInt(0);
/*  650 */     mplew.writeInt(1000);
/*  651 */     mplew.writeInt(skillid);
/*  652 */     mplew.writeInt(0);
/*  653 */     mplew.writeShort(0);
/*  654 */     mplew.writeLong(0L);
/*  655 */     mplew.writeInt(0);
/*  656 */     mplew.writeInt(0);
/*  657 */     return mplew.getPacket();
   }

   public static byte[] cancelSoulGauge() {
/*  661 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
/*  662 */     log.debug("调用");
/*  663 */     mplew.writeShort(SendPacketOpcode.CANCEL_BUFF.getValue());
/*  664 */     mplew.writeInt(0);
/*  665 */     writeSingleMask(mplew, MapleBuffStat.灵魂武器点数);
/*  666 */     mplew.writeInt(0);

/*  668 */     return mplew.getPacket();
   }

   public static byte[] giveSoulEffect(int skillid) {
/*  672 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
/*  673 */     log.debug("调用");
/*  674 */     mplew.writeShort(SendPacketOpcode.GIVE_BUFF.getValue());
/*  675 */     mplew.writeInt(0);
/*  676 */     mplew.writeInt(0);
/*  677 */     writeSingleMask(mplew, MapleBuffStat.灵魂武器特效);
/*  678 */     mplew.writeShort(0);
/*  679 */     mplew.writeInt(skillid);
/*  680 */     mplew.writeInt(640000);
/*  681 */     mplew.writeLong(0L);
/*  682 */     mplew.writeShort(8);
/*  683 */     mplew.writeLong(0L);
/*  684 */     mplew.writeInt(0);
/*  685 */     mplew.writeInt(0);
/*  686 */     return mplew.getPacket();
   }

   public static byte[] giveForeignSoulEffect(int cid, int skillid) {
/*  690 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
/*  691 */     log.debug("调用");
/*  692 */     mplew.writeShort(SendPacketOpcode.GIVE_FOREIGN_BUFF.getValue());
/*  693 */     mplew.writeInt(cid);
/*  694 */     writeSingleMask(mplew, MapleBuffStat.灵魂武器特效);
/*  695 */     mplew.writeInt(skillid);
/*  696 */     mplew.writeLong(6597069766656L);
/*  697 */     mplew.writeLong(0L);
/*  698 */     mplew.writeLong(0L);
/*  699 */     mplew.writeInt(0);
/*  700 */     mplew.write(0);
/*  701 */     mplew.write(0);
/*  702 */     mplew.write(0);
/*  703 */     mplew.writeInt(0);
/*  704 */     return mplew.getPacket();
   }






   public static byte[] cancelSoulEffect() {
/*  713 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/*  715 */     mplew.writeShort(SendPacketOpcode.CANCEL_BUFF.getValue());
/*  716 */     mplew.writeInt(0);
/*  717 */     writeSingleMask(mplew, MapleBuffStat.灵魂武器特效);
/*  718 */     mplew.writeInt(0);

/*  720 */     return mplew.getPacket();
   }


   public static byte[] cancelForeignSoulEffect(int cid) {
/*  725 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
/*  726 */     log.debug("调用");
/*  727 */     mplew.writeShort(SendPacketOpcode.CANCEL_FOREIGN_BUFF.getValue());
/*  728 */     mplew.writeInt(cid);
/*  729 */     writeSingleMask(mplew, MapleBuffStat.灵魂武器特效);
/*  730 */     mplew.write(1);

/*  732 */     return mplew.getPacket();
   }

   public static byte[] cancelForeignSoulEffect(MapleCharacter player) {
/*  736 */     return cancelForeignBuff(player, Collections.singletonList(MapleBuffStat.灵魂武器特效));
   }


   public static byte[] show灵魂武器(int buffid, int point) {
/*  741 */     log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
/*  742 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/*  744 */     mplew.writeShort(SendPacketOpcode.GIVE_BUFF.getValue());

/*  746 */     List<Pair<MapleBuffStat, Integer>> statups = new ArrayList<>();
/*  747 */     statups.add(new Pair(MapleBuffStat.灵魂武器点数, Integer.valueOf(0)));
/*  748 */     if (buffid > 0) {
/*  749 */       statups.add(new Pair(MapleBuffStat.增加魔法攻击力, Integer.valueOf(0)));
/*  750 */       statups.add(new Pair(MapleBuffStat.增加物理攻击力, Integer.valueOf(0)));
     }
/*  752 */     mplew.writeInt(0);
/*  753 */     mplew.writeInt(0);
/*  754 */     writeBuffMask(mplew, statups);
/*  755 */     mplew.writeShort(point);
/*  756 */     mplew.writeLong(buffid);
/*  757 */     mplew.writeShort(1000);
/*  758 */     mplew.writeShort(0);
/*  759 */     mplew.writeLong(buffid);
/*  760 */     mplew.writeShort(0);
/*  761 */     mplew.writeZeroBytes(3);

/*  763 */     if (buffid > 0) {
/*  764 */       for (int i = 0; i < 2; i++) {
/*  765 */         mplew.writeInt(1);
/*  766 */         mplew.writeInt(2590000);
/*  767 */         mplew.writeZeroBytes(13);
/*  768 */         mplew.writeHexString("75 2B 7D");
       }
     }

/*  772 */     mplew.writeHexString("00 00 00 00 01 00 00 00 00");
/*  773 */     mplew.writeInt(0);
/*  774 */     return mplew.getPacket();
   }


   public static byte[] show灵魂技能(int buffid) {
/*  779 */     log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
/*  780 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/*  782 */     mplew.writeShort(SendPacketOpcode.GIVE_BUFF.getValue());

/*  784 */     List<Pair<MapleBuffStat, Integer>> statups = new ArrayList<>();
/*  785 */     mplew.writeInt(0);
/*  786 */     mplew.writeInt(0);
/*  787 */     writeSingleMask(mplew, MapleBuffStat.灵魂武器特效);
/*  788 */     mplew.writeShort(0);
/*  789 */     mplew.writeInt(buffid);
/*  790 */     mplew.write(0);
/*  791 */     mplew.writeShort(2500);
/*  792 */     mplew.writeZeroBytes(23);
/*  793 */     mplew.writeInt(0);
/*  794 */     return mplew.getPacket();
   }


   public static byte[] giveSingleBuff(int buffid, int bufflength, Map<MapleBuffStat, Integer> statups, MapleStatEffect effect, MapleCharacter chr) {
/*  799 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
/*  800 */     mplew.writeShort(SendPacketOpcode.GIVE_BUFF.getValue());
/*  801 */     mplew.writeInt(0);
/*  802 */     mplew.writeInt(0);
/*  803 */     writeBuffMask(mplew, statups);
/*  804 */     boolean isWriteInt = statups.entrySet().stream().anyMatch(entry -> SkillConstants.isWriteBuffIntValue((MapleBuffStat)entry.getKey()));
/*  805 */     for (Map.Entry<MapleBuffStat, Integer> entry : statups.entrySet()) {
/*  806 */       int value = (entry.getKey() == MapleBuffStat.SECONDARY_STAT_MobZoneState) ? 1 : ((Integer)entry.getValue()).intValue();
/*  807 */       if (isWriteInt) {
/*  808 */         mplew.writeInt(value);
       } else {
/*  810 */         mplew.writeShort(value);
       }
/*  812 */       mplew.writeInt(buffid);
/*  813 */       mplew.writeInt((bufflength == 2100000000) ? 0 : bufflength);
     }
/*  815 */     writeBuffData(mplew, statups, effect, chr);
/*  816 */     mplew.writeZeroBytes(9);
/*  817 */     return mplew.getPacket();
   }




   public static byte[] giveDebuff(MapleDisease statups, int x, int skillid, int level, int duration) {
/*  824 */     log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
/*  825 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();


/*  828 */     mplew.writeShort(SendPacketOpcode.GIVE_BUFF.getValue());
/*  829 */     mplew.writeInt(0);
/*  830 */     mplew.writeInt(0);
/*  831 */     writeSingleMask(mplew, statups);





























/*  861 */     mplew.writeShort(x);
/*  862 */     mplew.writeShort(skillid);
/*  863 */     mplew.writeShort(level);
/*  864 */     mplew.writeInt(duration);
/*  865 */     mplew.writeZeroBytes(4);
/*  866 */     if (skillid == MapleDisease.缓慢.getDisease()) {
/*  867 */       mplew.write(0);
     }
/*  869 */     mplew.writeZeroBytes(5);
/*  870 */     mplew.writeShort(0);
/*  871 */     mplew.writeZeroBytes(3);
/*  872 */     if (skillid == MapleDisease.缓慢.getDisease()) {
/*  873 */       mplew.write(3);
     } else {
/*  875 */       mplew.write(4);
     }
/*  877 */     mplew.writeZeroBytes(5);
/*  878 */     mplew.writeInt(0);
/*  879 */     return mplew.getPacket();
   }


   public static void writeBuffData(MaplePacketLittleEndianWriter mplew, Map<MapleBuffStat, Integer> statups, MapleStatEffect effect, MapleCharacter player) {
/*  884 */     if (statups.containsKey(MapleBuffStat.灵魂武器点数)) {
/*  885 */       mplew.writeInt(0);
/*  886 */       mplew.writeInt(0);
     }
/*  888 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_FullSoulMP)) {
/*  889 */       mplew.writeInt(0);
     }
/*  891 */     int n3 = 0;
/*  892 */     mplew.writeShort(n3); int n2;
/*  893 */     for (n2 = 0; n2 < n3; n2++) {
/*  894 */       mplew.writeInt(0);
/*  895 */       mplew.write(0);
     }
/*  897 */     if (statups.containsKey(MapleBuffStat.拔刀姿势)) {
/*  898 */       mplew.writeInt(-40011288);
     }
/*  900 */     mplew.write(0);
/*  901 */     mplew.write(0);
/*  902 */     mplew.write(0);
/*  903 */     mplew.writeInt((effect != null && effect.getSourceid() == 400021060) ? 16769792 : 0);
/*  904 */     if (statups.containsKey(MapleBuffStat.幸运骰子)) {
/*  905 */       for (n2 = 0; n2 < 22; n2++) {
/*  906 */         mplew.writeInt(0);
       }
     }
/*  909 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_KeyDownMoving)) {
/*  910 */       mplew.writeInt(0);
     }
/*  912 */     if (statups.containsKey(MapleBuffStat.击杀点数)) {
/*  913 */       mplew.write(((Integer)statups.get(MapleBuffStat.击杀点数)).intValue());
     }
/*  915 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_PinkbeanRollingGrade)) {
/*  916 */       mplew.write(0);
     }
/*  918 */     if (statups.containsKey(MapleBuffStat.卡牌审判)) {
/*  919 */       switch (((Integer)statups.get(MapleBuffStat.卡牌审判)).intValue()) {
         case 1:
         case 2:
         case 4:
/*  923 */           mplew.writeInt((effect.getSourceid() == 20031209) ? 10 : 20);
           break;

         case 3:
/*  927 */           mplew.writeInt(2020);
           break;

         default:
/*  931 */           mplew.writeInt(0);
           break;
       }
     }
/*  935 */     if (statups.containsKey(MapleBuffStat.黑暗高潮)) {
/*  936 */       mplew.write(Math.max(((Integer)statups.get(MapleBuffStat.黑暗高潮)).intValue(), 1));
     }
/*  938 */     if (statups.containsKey(MapleBuffStat.三位一体)) {
/*  939 */       mplew.write(((Integer)statups.get(MapleBuffStat.三位一体)).intValue() / 5);
     }
/*  941 */     if (statups.containsKey(MapleBuffStat.元素冲击)) {





/*  947 */       int value = ((Integer)statups.get(MapleBuffStat.元素冲击)).intValue() / effect.getX();
/*  948 */       mplew.write(value);
/*  949 */       mplew.writeShort(effect.getY() * value);
/*  950 */       mplew.write(effect.getW() * value);
/*  951 */       mplew.write(effect.getU() * value);
     }

/*  954 */     if (statups.containsKey(MapleBuffStat.生命潮汐)) {
/*  955 */       n2 = 0;
/*  956 */       switch (((Integer)statups.get(MapleBuffStat.生命潮汐)).intValue()) {
         case 1:
/*  958 */           n2 = effect.getX();
           break;

         case 2:
/*  962 */           n2 = effect.getProp();
           break;

         case 3:
/*  966 */           n2 = player.getStat().getHp();
           break;
       }
/*  969 */       mplew.writeInt(n2);
     }
/*  971 */     if (statups.containsKey(MapleBuffStat.神圣保护)) {
/*  972 */       n2 = (((Integer)statups.get(MapleBuffStat.神圣保护)).intValue() == 2 && player.getBuffSource(MapleBuffStat.神圣保护) == 2311012) ? 1 : 0;
/*  973 */       mplew.write(n2);
     }
/*  975 */     if (statups.containsKey(MapleBuffStat.光暗转换)) {
/*  976 */       n2 = ((Integer)statups.get(MapleBuffStat.光暗转换)).intValue();
/*  977 */       mplew.writeInt((n2 == 1) ? effect.getSourceid() : 20040217);
/*  978 */       mplew.writeInt(effect.getDuration());
/*  979 */       mplew.writeInt((n2 == 1) ? 0 : 20040216);
/*  980 */       mplew.writeInt((n2 == 1) ? 0 : effect.getDuration());
/*  981 */       mplew.writeInt(-1);
/*  982 */       mplew.writeInt(player.getSpecialStat().getDarkLight());
/*  983 */       mplew.writeInt(0);
     }






/*  991 */     if (statups.containsKey(MapleBuffStat.百分比无视防御)) {
/*  992 */       mplew.writeInt(((Integer)statups.get(MapleBuffStat.百分比无视防御)).intValue() / 5);
     }
/*  994 */     if (statups.containsKey(MapleBuffStat.剑刃之壁)) {
/*  995 */       PacketHelper.write剑刃之壁(mplew, player, effect.getSourceid());
     }
/*  997 */     if (statups.containsKey(MapleBuffStat.变形值)) {
/*  998 */       n2 = 0;
/*  999 */       if (player.getMorphCount() >= 100) {
/* 1000 */         n2 = 1;
/* 1001 */       } else if (player.getMorphCount() >= 300) {
/* 1002 */         n2 = 2;
       }
/* 1004 */       mplew.writeInt(n2);
     }
/* 1006 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_MobZoneState)) {
/* 1007 */       ArrayList<Object> arrayList = new ArrayList();
/* 1008 */       arrayList.add(statups.get(MapleBuffStat.SECONDARY_STAT_MobZoneState));
/* 1009 */       arrayList.add(Integer.valueOf(-1));
/* 1010 */       for (Object anArrayList : arrayList) {
/* 1011 */         int n4 = ((Integer)anArrayList).intValue();
/* 1012 */         mplew.writeInt(n4);
       }
     }
/* 1015 */     if (statups.containsKey(MapleBuffStat.宝珠_伤害增加)) {
/* 1016 */       mplew.writeInt(2);
/* 1017 */       mplew.writeInt(152120001);
/* 1018 */       mplew.writeInt(400021000);
     }

/* 1021 */     if (statups.containsKey(MapleBuffStat.缓慢)) {
/* 1022 */       mplew.write(0);
     }
/* 1024 */     if (statups.containsKey(MapleBuffStat.寒冰灵气)) {
/* 1025 */       mplew.write(1);
     }
/* 1027 */     if (statups.containsKey(MapleBuffStat.抗震防御)) {
/* 1028 */       mplew.write(1);
     }
/* 1030 */     if (statups.containsKey(MapleBuffStat.受到伤害减少百分比)) {
/* 1031 */       mplew.write(0);
     }
/* 1033 */     if (statups.containsKey(MapleBuffStat.BOSS伤害)) {
/* 1034 */       mplew.write(1);
     }
/* 1036 */     if (statups.containsKey(MapleBuffStat.幸运钱)) {
/* 1037 */       mplew.writeInt(0);
/* 1038 */       mplew.write(0);
     }
/* 1040 */     if (statups.containsKey(MapleBuffStat.月光转换)) {
/* 1041 */       mplew.write(player.getBuffedIntValue(MapleBuffStat.日月轮转));
     }
/* 1043 */     if (statups.containsKey(MapleBuffStat.灵魂助力)) {


/* 1046 */       mplew.writeInt(player.getSoulSkillid());
/* 1047 */       mplew.writeInt(0);
     }
/* 1049 */     if (statups.containsKey(MapleBuffStat.交叉锁链)) {
/* 1050 */       mplew.writeInt(0);
     }
/* 1052 */     if (statups.containsKey(MapleBuffStat.重生契约)) {
/* 1053 */       mplew.writeInt(player.getBuffedIntValue(MapleBuffStat.重生契约));
     }
/* 1055 */     if (statups.containsKey(MapleBuffStat.极限射箭)) {
/* 1056 */       mplew.writeInt(0);
/* 1057 */       mplew.writeInt(0);
     }
/* 1059 */     if (statups.containsKey(MapleBuffStat.三彩箭矢)) {
/* 1060 */       mplew.writeInt(player.getSpecialStat().getArrowsMode() + 1);
     }
/* 1062 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_ImmuneBarrier)) {
/* 1063 */       mplew.writeInt(0);
     }
/* 1065 */     if (statups.containsKey(MapleBuffStat.圣洁之力)) {
/* 1066 */       mplew.write(0);
     }
/* 1068 */     if (statups.containsKey(MapleBuffStat.神圣迅捷)) {
/* 1069 */       mplew.write(0);
     }
/* 1071 */     if (statups.containsKey(MapleBuffStat.防甲穿透)) {
/* 1072 */       mplew.writeInt(0);
     }
/* 1074 */     if (statups.containsKey(MapleBuffStat.火眼晶晶)) {
/* 1075 */       mplew.writeInt(0);
     }
/* 1077 */     if (statups.containsKey(MapleBuffStat.进阶祝福)) {
/* 1078 */       mplew.writeInt(0);
     }
/* 1080 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_DebuffTolerance)) {
/* 1081 */       mplew.writeInt(0);
     }
/* 1083 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_DotHealHPPerSecond)) {
/* 1084 */       mplew.writeInt(0);
     }
/* 1086 */     if (statups.containsKey(MapleBuffStat.招魂结界)) {
/* 1087 */       mplew.writeInt(((Integer)statups.get(MapleBuffStat.招魂结界)).intValue());
     }
/* 1089 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK411)) {
/* 1090 */       mplew.writeInt(((Integer)statups.get(MapleBuffStat.SECONDARY_STAT_UNK411)).intValue());
     }

/* 1093 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_KnockBack)) {
/* 1094 */       mplew.writeInt(0);
/* 1095 */       mplew.writeInt(0);
     }



/* 1100 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_ShieldAttack)) {
/* 1101 */       mplew.writeInt(0);
     }
/* 1103 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_SSFShootingAttack)) {
/* 1104 */       mplew.writeInt(0);
     }
/* 1106 */     if (statups.containsKey(MapleBuffStat.战法灵气)) {
/* 1107 */       mplew.writeInt(738263040);
/* 1108 */       mplew.write(1);
     }
/* 1110 */     if (statups.containsKey(MapleBuffStat.结合灵气)) {
/* 1111 */       mplew.writeInt(1);
     }
/* 1113 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_PinkbeanAttackBuff)) {
/* 1114 */       mplew.writeInt(0);
     }
/* 1116 */     if (statups.containsKey(MapleBuffStat.皇家守护)) {
/* 1117 */       mplew.writeInt(((Integer)statups.get(MapleBuffStat.增加物理攻击力)).intValue());
/* 1118 */       mplew.writeInt(((Integer)statups.get(MapleBuffStat.皇家守护)).intValue());
     }
/* 1120 */     if (statups.containsKey(MapleBuffStat.灵魂链接)) {
/* 1121 */       mplew.writeInt(((player.getBuffStatValueHolder(MapleBuffStat.灵魂链接)).fromChrId == player.getId()) ? ((Integer)statups.get(MapleBuffStat.灵魂链接)).intValue() : 0);
/* 1122 */       mplew.writeBool((player.getParty() == null || (player.getParty() != null && player.getParty().getMembers().size() == 1)));
/* 1123 */       mplew.writeInt((player.getBuffStatValueHolder(MapleBuffStat.灵魂链接)).fromChrId);
/* 1124 */       mplew.writeInt(((player.getBuffStatValueHolder(MapleBuffStat.灵魂链接)).fromChrId != player.getId()) ? (player.getBuffStatValueHolder(MapleBuffStat.灵魂链接)).effect.getLevel() : 0);
     }
/* 1126 */     if (statups.containsKey(MapleBuffStat.激素狂飙)) {
/* 1127 */       mplew.write((effect.getSourceid() == 21110016) ? 1 : 0);
     }
/* 1129 */     if (statups.containsKey(MapleBuffStat.爆破弹夹)) {
/* 1130 */       mplew.write(player.getBullet());
/* 1131 */       mplew.writeShort(player.getCylinder());
     }
/* 1133 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK480)) {
/* 1134 */       mplew.writeInt(0);
     }
/* 1136 */     if (statups.containsKey(MapleBuffStat.神圣狂暴打击)) {
/* 1137 */       mplew.writeShort(0);
/* 1138 */       mplew.write(0);
     }
/* 1140 */     if (statups.containsKey(MapleBuffStat.钢铁之躯)) {
/* 1141 */       mplew.writeInt(player.getSpecialStat().getManOfSteel());
     }
/* 1143 */     mplew.writeInt((player != null && player.getSpecialStat().isEnergyFull()) ? player.getBuffSource(MapleBuffStat.能量获得) : 0);
/* 1144 */     if (statups.containsKey(MapleBuffStat.不消耗HP)) {
/* 1145 */       mplew.writeInt(0);
     }
/* 1147 */     if (statups.containsKey(MapleBuffStat.隐身术)) {
/* 1148 */       mplew.writeInt(660);
/* 1149 */       mplew.writeInt(660);
     }
/* 1151 */     if (statups.containsKey(MapleBuffStat.戴米安刻印)) {
/* 1152 */       mplew.writeInt(0);
     }
/* 1154 */     if (statups.containsKey(MapleBuffStat.精灵元素)) {
/* 1155 */       mplew.writeInt(0);
     }
/* 1157 */     if (statups.containsKey(MapleBuffStat.暴击蓄能)) {
/* 1158 */       mplew.writeInt(effect.getQ());
     }
/* 1160 */     if (statups.containsKey(MapleBuffStat.炎术引燃)) {
/* 1161 */       mplew.writeInt((player != null) ? player.getBuffedIntValue(MapleBuffStat.炎术引燃) : 0);
     }
/* 1163 */     if (statups.containsKey(MapleBuffStat.敛财术)) {
/* 1164 */       mplew.writeInt(0);
     }
/* 1166 */     if (statups.containsKey(MapleBuffStat.神圣归一)) {
/* 1167 */       mplew.writeShort(effect.getZ());
     }



/* 1172 */     if (statups.containsKey(MapleBuffStat.恶魔狂怒)) {
/* 1173 */       mplew.writeShort(0);
     }

/* 1176 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_SpinesOfShadow)) {
/* 1177 */       mplew.writeShort(35);
     }
/* 1179 */     if (statups.containsKey(MapleBuffStat.神奇圆环)) {
/* 1180 */       mplew.writeInt(0);
/* 1181 */       mplew.writeInt(0);
/* 1182 */       mplew.writeInt(0);
/* 1183 */       mplew.writeInt(0);
     }
/* 1185 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_VampDeath)) {
/* 1186 */       mplew.writeInt(3);
     }

/* 1189 */     if (statups.containsKey(MapleBuffStat.信天翁)) {
/* 1190 */       mplew.writeInt(0);
     }
   }




   public static byte[] giveForeignDebuff(int chrId, MapleDisease statups, int skillid, int level, int x) {
/* 1198 */     log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
/* 1199 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/* 1201 */     mplew.writeShort(SendPacketOpcode.GIVE_FOREIGN_BUFF.getValue());
/* 1202 */     mplew.writeInt(chrId);
/* 1203 */     writeSingleMask(mplew, statups);
/* 1204 */     if (skillid == 125) {
/* 1205 */       mplew.writeShort(0);
/* 1206 */       mplew.write(0);
     }
/* 1208 */     if (skillid == 184) {
/* 1209 */       mplew.writeInt(x);
     } else {
/* 1211 */       mplew.writeShort(x);
     }
/* 1213 */     mplew.writeShort(skillid);
/* 1214 */     mplew.writeShort(level);
/* 1215 */     mplew.writeInt(0);
/* 1216 */     mplew.writeZeroBytes(3);
/* 1217 */     mplew.writeZeroBytes(16);
/* 1218 */     mplew.writeZeroBytes(4);
/* 1219 */     mplew.write(0);
/* 1220 */     mplew.writeShort(900);
/* 1221 */     mplew.write(0);

/* 1223 */     return mplew.getPacket();
   }




   public static byte[] cancelForeignDebuff(int chrId, MapleDisease mask) {
/* 1230 */     log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
/* 1231 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/* 1233 */     mplew.writeShort(SendPacketOpcode.CANCEL_FOREIGN_BUFF.getValue());
/* 1234 */     mplew.writeInt(chrId);
/* 1235 */     writeSingleMask(mplew, mask);
/* 1236 */     mplew.write(3);
/* 1237 */     mplew.write(1);

/* 1239 */     return mplew.getPacket();
   }




   public static byte[] cancelForeignBuff(MapleCharacter chr, List<MapleBuffStat> statups) {
/* 1246 */     log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
/* 1247 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/* 1249 */     mplew.writeShort(SendPacketOpcode.CANCEL_FOREIGN_BUFF.getValue());
/* 1250 */     mplew.writeInt(chr.getId());
/* 1251 */     writeMask(mplew, statups);

/* 1253 */     for (MapleBuffStat mask : statups) {
/* 1254 */       if (mask.canStack()) {
/* 1255 */         List<SpecialBuffInfo> buffs = chr.getSpecialBuffInfo(mask);
/* 1256 */         mplew.writeInt(buffs.size());
/* 1257 */         for (SpecialBuffInfo info : buffs) {
/* 1258 */           mplew.writeInt(info.buffid);
/* 1259 */           mplew.writeLong(info.value);
/* 1260 */           mplew.writeInt(0);
/* 1261 */           mplew.writeInt(info.bufflength);
/* 1262 */           mplew.writeInt(0);
         }
       }
     }
/* 1266 */     if (statups.contains(MapleBuffStat.变身效果) || statups.contains(MapleBuffStat.移动速度) || statups.contains(MapleBuffStat.跳跃力) || statups.contains(MapleBuffStat.增加跳跃力) || statups.contains(MapleBuffStat.增加移动速度) || statups.contains(MapleBuffStat.冒险岛勇士) || statups.contains(MapleBuffStat.金属机甲) || statups.contains(MapleBuffStat.战法灵气) || statups.contains(MapleBuffStat.变形值) || statups.contains(MapleBuffStat.能量获得) || statups.contains(MapleBuffStat.疾驰速度) || statups.contains(MapleBuffStat.疾驰跳跃) || statups.contains(MapleBuffStat.飞行骑乘)) {
/* 1267 */       mplew.write(3);
/* 1268 */     } else if (statups.contains(MapleBuffStat.骑兽技能)) {
/* 1269 */       mplew.write(3);
/* 1270 */       mplew.write(1);
/* 1271 */     } else if (statups.contains(MapleBuffStat.月光转换)) {
/* 1272 */       mplew.write(0);
/* 1273 */     } else if (statups.contains(MapleBuffStat.飞翔)) {
/* 1274 */       mplew.write(6);
     } else {
/* 1276 */       mplew.write(0);
     }

/* 1279 */     return mplew.getPacket();
   }


   public static byte[] giveForeignBuff(MapleCharacter player, Map<MapleBuffStat, Integer> statups, MapleStatEffect effect) {
/* 1284 */     log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
/* 1285 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/* 1287 */     mplew.writeShort(SendPacketOpcode.GIVE_FOREIGN_BUFF.getValue());
/* 1288 */     mplew.writeInt(player.getId());
/* 1289 */     writeForeignBuff(mplew, player, statups, false);
/* 1290 */     mplew.write(0);
/* 1291 */     mplew.writeShort(0);
/* 1292 */     mplew.write(0);

/* 1294 */     return mplew.getPacket();
   }




   public static void writeForeignBuff(MaplePacketLittleEndianWriter mplew, MapleCharacter player, Map<MapleBuffStat, Integer> statups, boolean isChrinfo) {
/* 1301 */     writeBuffMask(mplew, statups);
/* 1302 */     if (statups.containsKey(MapleBuffStat.移动速度)) {
/* 1303 */       mplew.write(player.getBuffedIntValue(MapleBuffStat.移动速度));
     }
/* 1305 */     if (statups.containsKey(MapleBuffStat.斗气集中)) {
/* 1306 */       mplew.write(player.getBuffedIntValue(MapleBuffStat.斗气集中));
     }
/* 1308 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK78)) {
/* 1309 */       mplew.write(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_UNK78));
     }
/* 1311 */     if (statups.containsKey(MapleBuffStat.祝福之锤)) {
/* 1312 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.祝福之锤));
/* 1313 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.祝福之锤));
     }
/* 1315 */     if (statups.containsKey(MapleBuffStat.属性攻击)) {
/* 1316 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.属性攻击));
/* 1317 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.属性攻击));
     }
/* 1319 */     if (statups.containsKey(MapleBuffStat.元素冲击)) {
/* 1320 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.元素冲击));
     }
/* 1322 */     if (statups.containsKey(MapleBuffStat.昏迷)) {
/* 1323 */       mplew.writeShort(1);
/* 1324 */       mplew.writeShort((player.getDiseasesValue(MapleDisease.昏迷)).skillid);
/* 1325 */       mplew.writeShort((player.getDiseasesValue(MapleDisease.昏迷)).level);
     }
/* 1327 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_Shock)) {
/* 1328 */       mplew.write(1);
     }
/* 1330 */     if (statups.containsKey(MapleBuffStat.黑暗)) {
/* 1331 */       mplew.writeShort(1);
/* 1332 */       mplew.writeShort((player.getDiseasesValue(MapleDisease.黑暗)).skillid);
/* 1333 */       mplew.writeShort((player.getDiseasesValue(MapleDisease.黑暗)).level);
     }
/* 1335 */     if (statups.containsKey(MapleBuffStat.封印)) {
/* 1336 */       mplew.writeShort(1);
/* 1337 */       mplew.writeShort((player.getDiseasesValue(MapleDisease.封印)).skillid);
/* 1338 */       mplew.writeShort((player.getDiseasesValue(MapleDisease.封印)).level);
     }
/* 1340 */     if (statups.containsKey(MapleBuffStat.虚弱)) {
/* 1341 */       mplew.writeShort(1);
/* 1342 */       mplew.writeShort((player.getDiseasesValue(MapleDisease.虚弱)).skillid);
/* 1343 */       mplew.writeShort((player.getDiseasesValue(MapleDisease.虚弱)).level);
     }
/* 1345 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_WeaknessMdamage)) {
/* 1346 */       mplew.writeShort(0);
/* 1347 */       mplew.writeInt(0);
     }
/* 1349 */     if (statups.containsKey(MapleBuffStat.诅咒)) {
/* 1350 */       mplew.writeShort(1);
/* 1351 */       mplew.writeShort((player.getDiseasesValue(MapleDisease.诅咒)).skillid);
/* 1352 */       mplew.writeShort((player.getDiseasesValue(MapleDisease.诅咒)).level);
     }
/* 1354 */     if (statups.containsKey(MapleBuffStat.缓慢)) {
/* 1355 */       mplew.writeShort(1);
/* 1356 */       mplew.writeShort((player.getDiseasesValue(MapleDisease.缓慢)).skillid);
/* 1357 */       mplew.writeShort((player.getDiseasesValue(MapleDisease.缓慢)).level);
     }
/* 1359 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_PvPRaceEffect)) {
/* 1360 */       mplew.writeShort(0);
/* 1361 */       mplew.writeInt(0);
     }
/* 1363 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_DisOrder)) {
/* 1364 */       mplew.writeShort(0);
/* 1365 */       mplew.writeInt(0);
     }
/* 1367 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_Explosion)) {
/* 1368 */       mplew.write(0);
     }
/* 1370 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_Thread)) {
/* 1371 */       mplew.writeShort(0);
/* 1372 */       mplew.writeInt(0);
     }
/* 1374 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_Team)) {
/* 1375 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_Team));
/* 1376 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_Team));
     }
/* 1378 */     if (statups.containsKey(MapleBuffStat.中毒)) {
/* 1379 */       mplew.writeShort(1);
     }
/* 1381 */     if (statups.containsKey(MapleBuffStat.中毒)) {
/* 1382 */       mplew.writeShort(1);
/* 1383 */       mplew.writeShort((player.getDiseasesValue(MapleDisease.中毒)).skillid);
/* 1384 */       mplew.writeShort((player.getDiseasesValue(MapleDisease.中毒)).level);
     }
/* 1386 */     if (statups.containsKey(MapleBuffStat.影分身)) {
/* 1387 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.影分身));
/* 1388 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.影分身));
     }
/* 1390 */     statups.containsKey(MapleBuffStat.隐身术);
/* 1391 */     statups.containsKey(MapleBuffStat.无形箭弩);
/* 1392 */     if (statups.containsKey(MapleBuffStat.变身效果)) {
/* 1393 */       mplew.writeShort(player.getStatForBuff(MapleBuffStat.变身效果).getMorph(player));
/* 1394 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.变身效果));
     }
/* 1396 */     if (statups.containsKey(MapleBuffStat.GHOST_MORPH)) {
/* 1397 */       mplew.writeShort(0);
     }
/* 1399 */     if (statups.containsKey(MapleBuffStat.诱惑)) {
/* 1400 */       mplew.writeShort(1);
/* 1401 */       mplew.writeShort((player.getDiseasesValue(MapleDisease.诱惑)).skillid);
/* 1402 */       mplew.writeShort((player.getDiseasesValue(MapleDisease.诱惑)).level);
     }
/* 1404 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_Magnet)) {
/* 1405 */       mplew.writeShort(0);
/* 1406 */       mplew.writeInt(0);
     }
/* 1408 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_MagnetArea)) {
/* 1409 */       mplew.writeShort(0);
/* 1410 */       mplew.writeInt(0);
     }
/* 1412 */     if (statups.containsKey(MapleBuffStat.暗器伤人)) {
/* 1413 */       mplew.writeInt(player.getBuffedIntValue(MapleBuffStat.暗器伤人));
     }
/* 1415 */     if (statups.containsKey(MapleBuffStat.不死化)) {
/* 1416 */       mplew.writeShort(1);
/* 1417 */       mplew.writeShort((player.getDiseasesValue(MapleDisease.不死化)).skillid);
/* 1418 */       mplew.writeShort((player.getDiseasesValue(MapleDisease.不死化)).level);
     }
/* 1420 */     if (statups.containsKey(MapleBuffStat.ARIANT_COSS_IMU)) {
/* 1421 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.ARIANT_COSS_IMU));
/* 1422 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.ARIANT_COSS_IMU));
     }
/* 1424 */     if (statups.containsKey(MapleBuffStat.闪光击)) {
/* 1425 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.闪光击));
/* 1426 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.闪光击));
     }
/* 1428 */     if (statups.containsKey(MapleBuffStat.混乱)) {
/* 1429 */       mplew.writeShort(1);
/* 1430 */       mplew.writeShort((player.getDiseasesValue(MapleDisease.混乱)).skillid);
/* 1431 */       mplew.writeShort((player.getDiseasesValue(MapleDisease.混乱)).level);
     }
/* 1433 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_RespectPImmune)) {
/* 1434 */       mplew.writeInt(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_RespectPImmune));
     }
/* 1436 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_RespectMImmune)) {
/* 1437 */       mplew.writeInt(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_RespectMImmune));
     }
/* 1439 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_DefenseAtt)) {
/* 1440 */       mplew.writeInt(0);
     }
/* 1442 */     if (statups.containsKey(MapleBuffStat.ILLUSION)) {
/* 1443 */       mplew.writeInt(player.getBuffedIntValue(MapleBuffStat.ILLUSION));
     }
/* 1445 */     if (statups.containsKey(MapleBuffStat.狂暴战魂)) {
/* 1446 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.狂暴战魂));
/* 1447 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.狂暴战魂));
     }
/* 1449 */     statups.containsKey(MapleBuffStat.金刚霸体);
/* 1450 */     if (statups.containsKey(MapleBuffStat.天使状态)) {
/* 1451 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.天使状态));
/* 1452 */       mplew.writeInt(Math.abs(player.getBuffSource(MapleBuffStat.天使状态)));
     }
/* 1454 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK604)) {
/* 1455 */       mplew.writeShort(0);
/* 1456 */       mplew.writeInt(0);
     }
/* 1458 */     if (statups.containsKey(MapleBuffStat.无法使用药水)) {
/* 1459 */       mplew.writeShort(1);
/* 1460 */       mplew.writeShort((player.getDiseasesValue(MapleDisease.无法使用药水)).skillid);
/* 1461 */       mplew.writeShort((player.getDiseasesValue(MapleDisease.无法使用药水)).level);
     }
/* 1463 */     if (statups.containsKey(MapleBuffStat.SHADOW)) {
/* 1464 */       mplew.writeShort(1);

/* 1466 */       mplew.writeShort((player.getDiseasesValue(MapleDisease.SHADOW)).skillid);
/* 1467 */       mplew.writeShort((player.getDiseasesValue(MapleDisease.SHADOW)).level);
     }
/* 1469 */     if (statups.containsKey(MapleBuffStat.致盲)) {
/* 1470 */       mplew.writeShort(1);
/* 1471 */       mplew.writeShort((player.getDiseasesValue(MapleDisease.致盲)).skillid);
/* 1472 */       mplew.writeShort((player.getDiseasesValue(MapleDisease.致盲)).level);
     }
/* 1474 */     if (statups.containsKey(MapleBuffStat.魔法屏障)) {
/* 1475 */       mplew.writeInt(0);
     }
/* 1477 */     statups.containsKey(MapleBuffStat.飞翔);
/* 1478 */     if (statups.containsKey(MapleBuffStat.FREEZE)) {
/* 1479 */       mplew.writeShort(1);
/* 1480 */       mplew.writeShort((player.getDiseasesValue(MapleDisease.FREEZE)).skillid);
/* 1481 */       mplew.writeShort((player.getDiseasesValue(MapleDisease.FREEZE)).level);
     }
/* 1483 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_Frozen2)) {
/* 1484 */       mplew.writeShort(0);
/* 1485 */       mplew.writeInt(0);
     }
/* 1487 */     if (statups.containsKey(MapleBuffStat.龙卷风)) {
/* 1488 */       mplew.writeShort(1);
/* 1489 */       mplew.writeShort((player.getDiseasesValue(MapleDisease.龙卷风)).skillid);
/* 1490 */       mplew.writeShort((player.getDiseasesValue(MapleDisease.龙卷风)).level);
     }
/* 1492 */     if (statups.containsKey(MapleBuffStat.撤步退身)) {
/* 1493 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.撤步退身));
/* 1494 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.撤步退身));
     }
/* 1496 */     if (statups.containsKey(MapleBuffStat.终极斩)) {
/* 1497 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.终极斩));
/* 1498 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.终极斩));
     }
/* 1500 */     if (statups.containsKey(MapleBuffStat.时间胶囊)) {
/* 1501 */       mplew.write(0);
     }
/* 1503 */     statups.containsKey(MapleBuffStat.时间胶囊);
/* 1504 */     statups.containsKey(MapleBuffStat.潜入状态);
/* 1505 */     statups.containsKey(MapleBuffStat.ATTACK_BUFF);
/* 1506 */     if (statups.containsKey(MapleBuffStat.金属机甲)) {
/* 1507 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.金属机甲));
/* 1508 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.金属机甲));
     }
/* 1510 */     statups.containsKey(MapleBuffStat.祝福护甲);
/* 1511 */     statups.containsKey(MapleBuffStat.SECONDARY_STAT_BlessingArmorIncPAD);
/* 1512 */     if (statups.containsKey(MapleBuffStat.巨人药水)) {
/* 1513 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.巨人药水));
/* 1514 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.巨人药水));
     }
/* 1516 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_BuffLimit)) {
/* 1517 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_BuffLimit));
/* 1518 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_BuffLimit));
     }
/* 1520 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_DarkTornado)) {
/* 1521 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_DarkTornado));
/* 1522 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_DarkTornado));
     }
/* 1524 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_AmplifyDamage)) {
/* 1525 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_AmplifyDamage));
/* 1526 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_AmplifyDamage));
     }
/* 1528 */     if (statups.containsKey(MapleBuffStat.风影漫步)) {
/* 1529 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.风影漫步));
/* 1530 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.风影漫步));
     }
/* 1532 */     statups.containsKey(MapleBuffStat.神圣魔法盾);
/* 1533 */     if (statups.containsKey(MapleBuffStat.黑暗变形)) {
/* 1534 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.黑暗变形));
/* 1535 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.黑暗变形));
     }
/* 1537 */     if (statups.containsKey(MapleBuffStat.精神连接)) {
/* 1538 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.精神连接));
/* 1539 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.精神连接));
     }
/* 1541 */     if (statups.containsKey(MapleBuffStat.神圣拯救者的祝福)) {
/* 1542 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.神圣拯救者的祝福));
/* 1543 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.神圣拯救者的祝福));
     }
/* 1545 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_Event2)) {
/* 1546 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_Event2));
/* 1547 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_Event2));
     }
/* 1549 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_DeathMark)) {
/* 1550 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_DeathMark));
/* 1551 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_DeathMark));
     }
/* 1553 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_PainMark)) {
/* 1554 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_PainMark));
/* 1555 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_PainMark));
     }
/* 1557 */     if (statups.containsKey(MapleBuffStat.死亡束缚)) {
/* 1558 */       mplew.writeShort(1);
/* 1559 */       mplew.writeShort((player.getDiseasesValue(MapleDisease.死亡束缚)).skillid);
/* 1560 */       mplew.writeShort((player.getDiseasesValue(MapleDisease.死亡束缚)).level);
     }
/* 1562 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_VampDeath)) {
/* 1563 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_VampDeath));
/* 1564 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_VampDeath));
     }
/* 1566 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_VampDeathSummon)) {
/* 1567 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_VampDeathSummon));
/* 1568 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_VampDeathSummon));
     }
/* 1570 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_VenomSnake)) {
/* 1571 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_VenomSnake));
/* 1572 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_VenomSnake));
     }
/* 1574 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_PyramidEffect)) {
/* 1575 */       mplew.writeInt(-1);
     }
/* 1577 */     if (statups.containsKey(MapleBuffStat.击杀点数)) {
/* 1578 */       mplew.write(Math.min(player.getBuffedIntValue(MapleBuffStat.击杀点数), 5));
     }
/* 1580 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_PinkbeanRollingGrade)) {
/* 1581 */       mplew.write(0);
     }
/* 1583 */     if (statups.containsKey(MapleBuffStat.百分比无视防御)) {
/* 1584 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.百分比无视防御));
/* 1585 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.百分比无视防御));
     }
/* 1587 */     if (statups.containsKey(MapleBuffStat.幻影屏障)) {
/* 1588 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.幻影屏障));
/* 1589 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.幻影屏障));
     }
/* 1591 */     if (statups.containsKey(MapleBuffStat.卡牌审判)) {
/* 1592 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.卡牌审判));
/* 1593 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.卡牌审判));
     }
/* 1595 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_KeyDownAreaMoving)) {
/* 1596 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_KeyDownAreaMoving));
/* 1597 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_KeyDownAreaMoving));
     }
/* 1599 */     if (statups.containsKey(MapleBuffStat.黑暗高潮)) {
/* 1600 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.黑暗高潮));
     }
/* 1602 */     if (statups.containsKey(MapleBuffStat.黑暗祝福)) {
/* 1603 */       mplew.writeInt(player.getBuffedIntValue(MapleBuffStat.黑暗祝福));
     }
/* 1605 */     if (statups.containsKey(MapleBuffStat.光暗转换)) {
/* 1606 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.光暗转换));
/* 1607 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.光暗转换));
     }
/* 1609 */     if (statups.containsKey(MapleBuffStat.模式转换)) {
/* 1610 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.模式转换));
/* 1611 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.模式转换));
     }
/* 1613 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_SpecialAction)) {
/* 1614 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_SpecialAction));
/* 1615 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_SpecialAction));
     }
/* 1617 */     if (statups.containsKey(MapleBuffStat.剑刃之壁)) {
/* 1618 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.剑刃之壁));
/* 1619 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.剑刃之壁));
     }
/* 1621 */     if (statups.containsKey(MapleBuffStat.灵魂凝视)) {
/* 1622 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.灵魂凝视));
/* 1623 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.灵魂凝视));
     }
/* 1625 */     if (statups.containsKey(MapleBuffStat.伤害置换)) {
/* 1626 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.伤害置换));
/* 1627 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.伤害置换));
     }
/* 1629 */     if (statups.containsKey(MapleBuffStat.攻势之盾)) {
/* 1630 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.攻势之盾));
/* 1631 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.攻势之盾));
     }
/* 1633 */     if (statups.containsKey(MapleBuffStat.天使亲和)) {
/* 1634 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.天使亲和));
/* 1635 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.天使亲和));
     }
/* 1637 */     if (statups.containsKey(MapleBuffStat.灵魂鼓舞)) {
/* 1638 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.灵魂鼓舞));
/* 1639 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.灵魂鼓舞));
     }
/* 1641 */     if (statups.containsKey(MapleBuffStat.隐藏碎片)) {
/* 1642 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.隐藏碎片));
/* 1643 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.隐藏碎片));
     }
/* 1645 */     if (statups.containsKey(MapleBuffStat.变形值)) {
/* 1646 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.变形值));
/* 1647 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.变形值));
     }
/* 1649 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_MobZoneState)) {
/* 1650 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_MobZoneState));
/* 1651 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_MobZoneState));
     }
/* 1653 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_GiveMeHeal)) {
/* 1654 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_GiveMeHeal));
/* 1655 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_GiveMeHeal));
     }
/* 1657 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_TouchMe)) {
/* 1658 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_TouchMe));
/* 1659 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_TouchMe));
     }
/* 1661 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_Contagion)) {
/* 1662 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_Contagion));
/* 1663 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_Contagion));
     }
/* 1665 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_Contagion)) {
/* 1666 */       mplew.writeInt(0);
     }
/* 1668 */     if (statups.containsKey(MapleBuffStat.连击无限制)) {
/* 1669 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.连击无限制));
/* 1670 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.连击无限制));
     }
/* 1672 */     if (statups.containsKey(MapleBuffStat.至圣领域)) {
/* 1673 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.至圣领域));
/* 1674 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.至圣领域));
     }
/* 1676 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_IgnoreAllCounter)) {
/* 1677 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_IgnoreAllCounter));
/* 1678 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_IgnoreAllCounter));
     }
/* 1680 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_IgnorePImmune)) {
/* 1681 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_IgnorePImmune));
/* 1682 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_IgnorePImmune));
     }
/* 1684 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_IgnoreAllImmune)) {
/* 1685 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_IgnoreAllImmune));
/* 1686 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_IgnoreAllImmune));
     }




/* 1692 */     if (statups.containsKey(MapleBuffStat.最终审判)) {
/* 1693 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.最终审判));
/* 1694 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.最终审判));
     }
/* 1696 */     if (statups.containsKey(MapleBuffStat.抗震防御)) {
/* 1697 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.抗震防御));
/* 1698 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.抗震防御));
     }
/* 1700 */     if (statups.containsKey(MapleBuffStat.寒冰灵气)) {
/* 1701 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.寒冰灵气));
/* 1702 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.寒冰灵气));
     }
/* 1704 */     if (statups.containsKey(MapleBuffStat.火焰灵气)) {
/* 1705 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.火焰灵气));
/* 1706 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.火焰灵气));
     }
/* 1708 */     statups.containsKey(MapleBuffStat.天使复仇);
/* 1709 */     if (statups.containsKey(MapleBuffStat.天堂之门)) {
/* 1710 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.天堂之门));
/* 1711 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.天堂之门));
     }
/* 1713 */     if (statups.containsKey(MapleBuffStat.伤害吸收)) {
/* 1714 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.伤害吸收));
/* 1715 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.伤害吸收));
     }
/* 1717 */     if (statups.containsKey(MapleBuffStat.神圣保护)) {
/* 1718 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.神圣保护));
/* 1719 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.神圣保护));
     }
/* 1721 */     if (statups.containsKey(MapleBuffStat.无敌状态)) {
/* 1722 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.无敌状态));
/* 1723 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.无敌状态));
     }
/* 1725 */     if (statups.containsKey(MapleBuffStat.流血剧毒)) {
/* 1726 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.流血剧毒));
/* 1727 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.流血剧毒));
     }
/* 1729 */     if (statups.containsKey(MapleBuffStat.隐形剑)) {
/* 1730 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.隐形剑));
/* 1731 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.隐形剑));
     }
/* 1733 */     if (statups.containsKey(MapleBuffStat.不倦神酒)) {
/* 1734 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.不倦神酒));
/* 1735 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.不倦神酒));
     }
/* 1737 */     if (statups.containsKey(MapleBuffStat.阿修罗)) {
/* 1738 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.阿修罗));
/* 1739 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.阿修罗));
     }
/* 1741 */     if (statups.containsKey(MapleBuffStat.超能光束炮)) {
/* 1742 */       mplew.writeInt(player.getBuffedIntValue(MapleBuffStat.超能光束炮));
/* 1743 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.超能光束炮));
     }
/* 1745 */     if (statups.containsKey(MapleBuffStat.混元归一)) {
/* 1746 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.混元归一));
/* 1747 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.混元归一));
     }
/* 1749 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_Stimulate)) {
/* 1750 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_Stimulate));
/* 1751 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_Stimulate));
     }
/* 1753 */     if (statups.containsKey(MapleBuffStat.返回原位置)) {
/* 1754 */       mplew.write(1);

/* 1756 */       mplew.writeShort((player.getDiseasesValue(MapleDisease.返回原位置)).skillid);
/* 1757 */       mplew.writeShort((player.getDiseasesValue(MapleDisease.返回原位置)).level);
     }
/* 1759 */     if (statups.containsKey(MapleBuffStat.精灵的帽子)) {
/* 1760 */       mplew.writeShort(1);
/* 1761 */       mplew.writeShort((player.getDiseasesValue(MapleDisease.精灵帽子)).skillid);
/* 1762 */       mplew.writeShort((player.getDiseasesValue(MapleDisease.精灵帽子)).level);
     }
/* 1764 */     if (statups.containsKey(MapleBuffStat.恶魔超越)) {
/* 1765 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.恶魔超越));
/* 1766 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.恶魔超越));
     }
/* 1768 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_FireBomb)) {
/* 1769 */       mplew.write(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_FireBomb));
/* 1770 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_FireBomb));
     }
/* 1772 */     if (statups.containsKey(MapleBuffStat.尖兵电力)) {
/* 1773 */       mplew.write(player.getBuffedIntValue(MapleBuffStat.尖兵电力));
     }

/* 1776 */     if (statups.containsKey(MapleBuffStat.飞行骑乘)) {
/* 1777 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.飞行骑乘));
/* 1778 */       mplew.writeInt(Math.abs(player.getBuffSource(MapleBuffStat.飞行骑乘)));
     }
/* 1780 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_NaviFlying)) {
/* 1781 */       mplew.writeShort(0);
/* 1782 */       mplew.writeInt(0);
     }
/* 1784 */     if (statups.containsKey(MapleBuffStat.永动引擎)) {
/* 1785 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.永动引擎));
/* 1786 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.永动引擎));
     }
/* 1788 */     if (statups.containsKey(MapleBuffStat.元素属性)) {
/* 1789 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.元素属性));
/* 1790 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.元素属性));
     }
/* 1792 */     if (statups.containsKey(MapleBuffStat.开天辟地)) {
/* 1793 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.开天辟地));
/* 1794 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.开天辟地));
     }
/* 1796 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_EventPointAbsorb)) {
/* 1797 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_EventPointAbsorb));
/* 1798 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_EventPointAbsorb));
     }
/* 1800 */     if (statups.containsKey(MapleBuffStat.ECONDARY_STAT_EventAssemble)) {
/* 1801 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.ECONDARY_STAT_EventAssemble));
/* 1802 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.ECONDARY_STAT_EventAssemble));
     }
/* 1804 */     if (statups.containsKey(MapleBuffStat.信天翁)) {
/* 1805 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.属性攻击));
/* 1806 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.属性攻击));
     }
/* 1808 */     if (statups.containsKey(MapleBuffStat.神之子透明)) {
/* 1809 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.神之子透明));
/* 1810 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.神之子透明));
     }
/* 1812 */     if (statups.containsKey(MapleBuffStat.月光转换)) {
/* 1813 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.月光转换));
/* 1814 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.月光转换));
     }
/* 1816 */     if (statups.containsKey(MapleBuffStat.灵魂融入)) {
/* 1817 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.灵魂融入));
/* 1818 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.灵魂融入));
     }
/* 1820 */     if (statups.containsKey(MapleBuffStat.元素灵魂_僵直)) {
/* 1821 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.元素灵魂_僵直));
/* 1822 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.元素灵魂_僵直));
     }
/* 1824 */     if (statups.containsKey(MapleBuffStat.日月轮转)) {
/* 1825 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.日月轮转));
/* 1826 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.日月轮转));
     }
/* 1828 */     if (statups.containsKey(MapleBuffStat.重生契约)) {
/* 1829 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.重生契约));
/* 1830 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.重生契约));
     }
/* 1832 */     if (statups.containsKey(MapleBuffStat.灵魂助力)) {
/* 1833 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.灵魂助力));
/* 1834 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.灵魂助力));
     }
/* 1836 */     if (statups.containsKey(MapleBuffStat.三彩箭矢)) {
/* 1837 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.三彩箭矢));
/* 1838 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.三彩箭矢));
     }
/* 1840 */     if (statups.containsKey(MapleBuffStat.防甲穿透)) {
/* 1841 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.防甲穿透));
/* 1842 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.防甲穿透));
     }
/* 1844 */     statups.containsKey(MapleBuffStat.灵气大融合);
/* 1845 */     if (statups.containsKey(MapleBuffStat.圣洁之力)) {
/* 1846 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.圣洁之力));
/* 1847 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.圣洁之力));
     }
/* 1849 */     if (statups.containsKey(MapleBuffStat.神圣迅捷)) {
/* 1850 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.神圣迅捷));
/* 1851 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.神圣迅捷));
     }
/* 1853 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_ImmuneBarrier)) {
/* 1854 */       mplew.writeInt(0);
     }
/* 1856 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_ImmuneBarrier)) {
/* 1857 */       mplew.writeInt(0);
     }
/* 1859 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_FullSoulMP)) {
/* 1860 */       mplew.writeInt(0);
/* 1861 */       mplew.writeInt(0);
     }
/* 1863 */     if (statups.containsKey(MapleBuffStat.神圣保护)) {
/* 1864 */       mplew.writeBool((player.getBuffSource(MapleBuffStat.神圣保护) == 2311012));
/* 1865 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.神圣保护));
     }
/* 1867 */     if (statups.containsKey(MapleBuffStat.地雷)) {
/* 1868 */       mplew.writeInt(0);
/* 1869 */       mplew.writeInt(0);
     }
/* 1871 */     if (statups.containsKey(MapleBuffStat.招魂结界)) {
/* 1872 */       mplew.writeInt(player.getBuffedIntValue(MapleBuffStat.招魂结界));
/* 1873 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.招魂结界));
     }
/* 1875 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK411)) {
/* 1876 */       mplew.writeInt(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_UNK411));
/* 1877 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_UNK411));
     }
/* 1879 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_ComboTempest)) {
/* 1880 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_ComboTempest));
/* 1881 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_ComboTempest));
     }
/* 1883 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_HalfstatByDebuff)) {
/* 1884 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_HalfstatByDebuff));
/* 1885 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_HalfstatByDebuff));
     }
/* 1887 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_ComplusionSlant)) {
/* 1888 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_ComplusionSlant));
/* 1889 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_ComplusionSlant));
     }
/* 1891 */     if (statups.containsKey(MapleBuffStat.召唤美洲豹)) {
/* 1892 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.召唤美洲豹));
/* 1893 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.召唤美洲豹));
     }
/* 1895 */     if (statups.containsKey(MapleBuffStat.战法灵气)) {
/* 1896 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.战法灵气));
/* 1897 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.战法灵气));
     }
/* 1899 */     if (statups.containsKey(MapleBuffStat.轰炸时间)) {
/* 1900 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.轰炸时间));
/* 1901 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.轰炸时间));
     }
/* 1903 */     if (statups.containsKey(MapleBuffStat.超人变形)) {
/* 1904 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.超人变形));
/* 1905 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.超人变形));
     }
/* 1907 */     if (statups.containsKey(MapleBuffStat.爱星能量)) {
/* 1908 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.爱星能量));
/* 1909 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.爱星能量));
     }
/* 1911 */     if (statups.containsKey(MapleBuffStat.心雷合一)) {
/* 1912 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.心雷合一));
/* 1913 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.心雷合一));
     }
/* 1915 */     if (statups.containsKey(MapleBuffStat.子弹盛宴)) {
/* 1916 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.子弹盛宴));
/* 1917 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.子弹盛宴));
     }
/* 1919 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK498)) {
/* 1920 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_UNK498));
/* 1921 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_UNK498));
     }
/* 1923 */     if (statups.containsKey(MapleBuffStat.变换攻击)) {
/* 1924 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.变换攻击));
/* 1925 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.变换攻击));
     }
/* 1927 */     if (statups.containsKey(MapleBuffStat.祈祷)) {
/* 1928 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.祈祷));
/* 1929 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.祈祷));
     }
/* 1931 */     if (statups.containsKey(MapleBuffStat.黑暗闪电)) {
/* 1932 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.黑暗闪电));
/* 1933 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.黑暗闪电));
     }
/* 1935 */     if (statups.containsKey(MapleBuffStat.战斗大师)) {
/* 1936 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.战斗大师));
/* 1937 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.战斗大师));
     }
/* 1939 */     if (statups.containsKey(MapleBuffStat.花炎结界)) {
/* 1940 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.花炎结界));
/* 1941 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.花炎结界));
     }
/* 1943 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_KeyDownMoving)) {
/* 1944 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_KeyDownMoving));
/* 1945 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_KeyDownMoving));
     }
/* 1947 */     if (statups.containsKey(MapleBuffStat.灵魂链接)) {
/* 1948 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.灵魂链接));
/* 1949 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.灵魂链接));
     }
/* 1951 */     if (statups.containsKey(MapleBuffStat.心魂本能)) {
/* 1952 */       mplew.writeInt(player.getBuffedIntValue(MapleBuffStat.心魂本能));
/* 1953 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.心魂本能));
     }
/* 1955 */     if (statups.containsKey(MapleBuffStat.不消耗HP)) {
/* 1956 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.不消耗HP));
/* 1957 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.不消耗HP));
     }
/* 1959 */     if (statups.containsKey(MapleBuffStat.不消耗HP)) {
/* 1960 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.不消耗HP));
     }
/* 1962 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK468)) {
/* 1963 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_UNK468));
/* 1964 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_UNK468));
     }
/* 1966 */     if (statups.containsKey(MapleBuffStat.激素狂飙)) {
/* 1967 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.激素狂飙));
     }
/* 1969 */     if (statups.containsKey(MapleBuffStat.忍耐之盾)) {
/* 1970 */       mplew.writeInt(0);
     }
/* 1972 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK480)) {
/* 1973 */       mplew.writeInt(0);
     }
/* 1975 */     if (statups.containsKey(MapleBuffStat.神圣狂暴打击)) {
/* 1976 */       mplew.writeInt(0);
     }
/* 1978 */     if (statups.containsKey(MapleBuffStat.向导之箭)) {
/* 1979 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.向导之箭));
/* 1980 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.向导之箭));
     }
/* 1982 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK250)) {
/* 1983 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_UNK250));
/* 1984 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_UNK250));
     }
/* 1986 */     if (statups.containsKey(MapleBuffStat.祝福标记)) {
/* 1987 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.祝福标记));
/* 1988 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.祝福标记));
     }
/* 1990 */     if (statups.containsKey(MapleBuffStat.精灵元素)) {
/* 1991 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.精灵元素));
/* 1992 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.精灵元素));
     }
/* 1994 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK262)) {
/* 1995 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_UNK262));
/* 1996 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_UNK262));
     }
/* 1998 */     if (statups.containsKey(MapleBuffStat.戴米安刻印)) {
/* 1999 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.戴米安刻印));
/* 2000 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.戴米安刻印));
     }
/* 2002 */     if (statups.containsKey(MapleBuffStat.神圣归一)) {
/* 2003 */       mplew.writeInt(player.getBuffedIntValue(MapleBuffStat.神圣归一));
/* 2004 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.神圣归一));
     }
/* 2006 */     if (statups.containsKey(MapleBuffStat.神奇圆环)) {
/* 2007 */       mplew.writeInt(player.getBuffedIntValue(MapleBuffStat.神奇圆环));
/* 2008 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.神奇圆环));
     }
/* 2010 */     if (statups.containsKey(MapleBuffStat.心魂龙卷风)) {
/* 2011 */       mplew.writeInt(player.getBuffedIntValue(MapleBuffStat.心魂龙卷风));
     }
/* 2013 */     if (statups.containsKey(MapleBuffStat.装备摩诃)) {
/* 2014 */       mplew.writeInt(player.getBuffedIntValue(MapleBuffStat.装备摩诃));
     }
/* 2016 */     if (statups.containsKey(MapleBuffStat.超压魔力)) {
/* 2017 */       mplew.writeInt(player.getBuffedIntValue(MapleBuffStat.超压魔力));
     }
/* 2019 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_CursorSniping)) {
/* 2020 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_CursorSniping));
/* 2021 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_CursorSniping));
     }
/* 2023 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK522)) {
/* 2024 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_UNK522));
/* 2025 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_UNK522));
     }
/* 2027 */     if (statups.containsKey(MapleBuffStat.聚光灯)) {
/* 2028 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.聚光灯));
/* 2029 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.聚光灯));
     }
/* 2031 */     if (statups.containsKey(MapleBuffStat.过载模式)) {
/* 2032 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.过载模式));
/* 2033 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.过载模式));
     }
/* 2035 */     if (statups.containsKey(MapleBuffStat.弗里德的加护)) {
/* 2036 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.弗里德的加护));
/* 2037 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.弗里德的加护));
     }
/* 2039 */     if (statups.containsKey(MapleBuffStat.强化祝福之锤)) {
/* 2040 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.强化祝福之锤));
/* 2041 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.强化祝福之锤));
     }
/* 2043 */     if (statups.containsKey(MapleBuffStat.超速传动)) {
/* 2044 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.超速传动));
/* 2045 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.超速传动));
     }
/* 2047 */     if (statups.containsKey(MapleBuffStat.次元神隐)) {
/* 2048 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.次元神隐));
/* 2049 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.次元神隐));
     }
/* 2051 */     if (statups.containsKey(MapleBuffStat.视死如归)) {
/* 2052 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.视死如归));
/* 2053 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.视死如归));
     }
/* 2055 */     if (statups.containsKey(MapleBuffStat.暴击强化)) {
/* 2056 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.暴击强化));
/* 2057 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.暴击强化));
     }
/* 2059 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK530)) {
/* 2060 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_UNK530));
/* 2061 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_UNK530));
     }
/* 2063 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK531)) {
/* 2064 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_UNK531));
/* 2065 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_UNK531));
     }
/* 2067 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK532)) {
/* 2068 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_UNK532));
/* 2069 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_UNK532));
     }
/* 2071 */     if (statups.containsKey(MapleBuffStat.钢铁之躯)) {
/* 2072 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.钢铁之躯));
/* 2073 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.钢铁之躯));
     }
/* 2075 */     if (statups.containsKey(MapleBuffStat.荣耀之翼)) {
/* 2076 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.荣耀之翼));
/* 2077 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.荣耀之翼));
     }
/* 2079 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK534)) {
/* 2080 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_UNK534));
/* 2081 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_UNK534));
     }
/* 2083 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK534)) {
/* 2084 */       mplew.writeInt(0);
     }
/* 2086 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK535)) {
/* 2087 */       mplew.writeInt(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_UNK535));
/* 2088 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_UNK535));
     }
/* 2090 */     if (statups.containsKey(MapleBuffStat.和谐连接)) {
/* 2091 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.和谐连接));
/* 2092 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.和谐连接));
     }
/* 2094 */     if (statups.containsKey(MapleBuffStat.快速充能)) {
/* 2095 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.快速充能));
/* 2096 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.快速充能));
     }
/* 2098 */     if (statups.containsKey(MapleBuffStat.控制侵蚀)) {
/* 2099 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.控制侵蚀));
/* 2100 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.控制侵蚀));
     }
/* 2102 */     if (statups.containsKey(MapleBuffStat.追魂手)) {
/* 2103 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.追魂手));
/* 2104 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.追魂手));
     }
/* 2106 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK560)) {
/* 2107 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_UNK560));
/* 2108 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_UNK560));
     }

/* 2111 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK535)) {
/* 2112 */       mplew.writeInt(0);
     }

/* 2115 */     statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK569);

/* 2117 */     if (statups.containsKey(MapleBuffStat.崇高十字_2)) {
/* 2118 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.崇高十字_2));
/* 2119 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.崇高十字_2));
     }
/* 2121 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK586)) {
/* 2122 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_UNK586));
/* 2123 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_UNK586));
     }
/* 2125 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK587)) {
/* 2126 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_UNK587));
/* 2127 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_UNK587));
     }
/* 2129 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK590)) {
/* 2130 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_UNK590));
/* 2131 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_UNK590));
     }
/* 2133 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK591)) {
/* 2134 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_UNK591));
/* 2135 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_UNK591));
     }
/* 2137 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK592)) {
/* 2138 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_UNK592));
/* 2139 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_UNK592));
     }
/* 2141 */     statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK593);
/* 2142 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK595)) {
/* 2143 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_UNK595));
/* 2144 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_UNK595));
     }
/* 2146 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK600)) {
/* 2147 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_UNK600));
/* 2148 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_UNK600));
     }
/* 2150 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK609)) {
/* 2151 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_UNK609));
/* 2152 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_UNK609));
     }




/* 2158 */     if (statups.containsKey(MapleBuffStat.守护模式变更)) {
/* 2159 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.守护模式变更));
/* 2160 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.守护模式变更));
     }
/* 2162 */     if (statups.containsKey(MapleBuffStat.舞力全开)) {
/* 2163 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.舞力全开));
/* 2164 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.舞力全开));
     }
/* 2166 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK612)) {
/* 2167 */       mplew.writeInt(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_UNK612));
/* 2168 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_UNK612));
     }
/* 2170 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK626)) {
/* 2171 */       mplew.writeInt(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_UNK626));
/* 2172 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_UNK626));
     }
/* 2174 */     if (statups.containsKey(MapleBuffStat.拔刀姿势)) {
/* 2175 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.拔刀姿势));
/* 2176 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.拔刀姿势));
     }
/* 2178 */     if (statups.containsKey(MapleBuffStat.拔刀姿势)) {
/* 2179 */       mplew.writeInt(-40011288);
     }
/* 2181 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK617)) {
/* 2182 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_UNK617));
/* 2183 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_UNK617));
     }
/* 2185 */     if (statups.containsKey(MapleBuffStat.拔刀术加成)) {
/* 2186 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.拔刀术加成));
/* 2187 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.拔刀术加成));
     }
/* 2189 */     if (statups.containsKey(MapleBuffStat.增加攻击力)) {
/* 2190 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.增加攻击力));
/* 2191 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.增加攻击力));
     }
/* 2193 */     if (statups.containsKey(MapleBuffStat.增加HP百分比)) {
/* 2194 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.增加HP百分比));
/* 2195 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.增加HP百分比));
     }
/* 2197 */     if (statups.containsKey(MapleBuffStat.增加MP百分比)) {
/* 2198 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.增加MP百分比));
/* 2199 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.增加MP百分比));
     }
/* 2201 */     if (statups.containsKey(MapleBuffStat.一闪)) {
/* 2202 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.一闪));
/* 2203 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.一闪));
     }
/* 2205 */     if (statups.containsKey(MapleBuffStat.花炎结界)) {
/* 2206 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.花炎结界));
/* 2207 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.花炎结界));
     }
/* 2209 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK626)) {
/* 2210 */       mplew.writeInt(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_UNK626));
/* 2211 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_UNK626));
     }
/* 2213 */     if (statups.containsKey(MapleBuffStat.稳如泰山)) {
/* 2214 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.稳如泰山));
/* 2215 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.稳如泰山));
     }
/* 2217 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK468)) {
/* 2218 */       mplew.writeInt(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_UNK468));
/* 2219 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_UNK468));
     }
/* 2221 */     if (statups.containsKey(MapleBuffStat.结界破魔)) {
/* 2222 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.结界破魔));
/* 2223 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.结界破魔));
     }
/* 2225 */     if (statups.containsKey(MapleBuffStat.厚积薄发)) {
/* 2226 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.厚积薄发));
/* 2227 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.厚积薄发));
     }
/* 2229 */     if (statups.containsKey(MapleBuffStat.晓月流基本技能)) {
/* 2230 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.晓月流基本技能));
/* 2231 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.晓月流基本技能));
     }
/* 2233 */     if (statups.containsKey(MapleBuffStat.水枪阵营)) {
/* 2234 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.水枪阵营));
     }
/* 2236 */     if (statups.containsKey(MapleBuffStat.水枪军阶)) {
/* 2237 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.水枪军阶));
     }
/* 2239 */     if (statups.containsKey(MapleBuffStat.水枪效果)) {
/* 2240 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.水枪效果));
/* 2241 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.水枪效果));
     }
/* 2243 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK634)) {
/* 2244 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_UNK634));
     }
/* 2246 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_ReduceMana)) {
/* 2247 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_ReduceMana));
     }
/* 2249 */     if (statups.containsKey(MapleBuffStat.爆裂箭)) {
/* 2250 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.爆裂箭));
/* 2251 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.爆裂箭));
     }
/* 2253 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK516)) {
/* 2254 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_UNK516));
/* 2255 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_UNK516));
     }
/* 2257 */     mplew.write(0);
/* 2258 */     mplew.write(0);
/* 2259 */     mplew.write(JobConstants.is魂骑士(player.getJob()) ? 5 : 0);
/* 2260 */     mplew.writeInt(0);
/* 2261 */     int buffSource = player.getBuffSource(MapleBuffStat.能量获得);
/* 2262 */     mplew.writeInt(player.getSpecialStat().isEnergyFull() ? buffSource : 0);

/* 2264 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK530)) {
/* 2265 */       mplew.writeInt(0);
     }
/* 2267 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK531)) {
/* 2268 */       mplew.writeInt(0);
     }
/* 2270 */     if (statups.containsKey(MapleBuffStat.月光转换)) {
/* 2271 */       mplew.write((player.getBuffedValue(MapleBuffStat.月光转换) != null) ? 1 : 0);
     }
/* 2273 */     if (statups.containsKey(MapleBuffStat.圣洁之力)) {
/* 2274 */       mplew.write(0);
     }
/* 2276 */     if (statups.containsKey(MapleBuffStat.神圣迅捷)) {
/* 2277 */       mplew.write(0);
     }
/* 2279 */     if (statups.containsKey(MapleBuffStat.战法灵气)) {
/* 2280 */       mplew.write((player.getBuffedValue(MapleBuffStat.战法灵气) != null) ? 1 : 0);
     }
/* 2282 */     if (statups.containsKey(MapleBuffStat.结合灵气)) {
/* 2283 */       mplew.writeInt(0);
/* 2284 */       mplew.writeInt(0);
/* 2285 */       mplew.writeInt(0);
     }
/* 2287 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_BattlePvP_LangE_Protection)) {
/* 2288 */       mplew.writeInt(0);
/* 2289 */       mplew.writeInt(0);
     }
/* 2291 */     if (statups.containsKey(MapleBuffStat.灵魂链接)) {
/* 2292 */       mplew.writeInt(((player.getBuffStatValueHolder(MapleBuffStat.灵魂链接)).fromChrId == player.getId()) ? ((Integer)statups.get(MapleBuffStat.灵魂链接)).intValue() : 0);
/* 2293 */       mplew.writeBool(((player.getBuffStatValueHolder(MapleBuffStat.灵魂链接)).fromChrId == player.getId() && ((Integer)statups.get(MapleBuffStat.灵魂链接)).intValue() <= 1));
/* 2294 */       mplew.writeInt((player.getBuffStatValueHolder(MapleBuffStat.灵魂链接)).fromChrId);
/* 2295 */       mplew.writeInt((((Integer)statups.get(MapleBuffStat.灵魂链接)).intValue() > 1) ? (player.getBuffStatValueHolder(MapleBuffStat.灵魂链接)).effect.getLevel() : 0);
     }
/* 2297 */     if (statups.containsKey(MapleBuffStat.激素狂飙)) {
/* 2298 */       mplew.write(1);
     }
/* 2300 */     if (statups.containsKey(MapleBuffStat.戴米安刻印)) {
/* 2301 */       mplew.writeInt(player.getBuffedIntValue(MapleBuffStat.戴米安刻印));
     }
/* 2303 */     if (statups.containsKey(MapleBuffStat.神圣归一)) {
/* 2304 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.神圣归一));
     }
/* 2306 */     if (statups.containsKey(MapleBuffStat.恶魔狂怒)) {
/* 2307 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.恶魔狂怒));
     }
/* 2309 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_SpinesOfShadow)) {
/* 2310 */       mplew.writeShort(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_SpinesOfShadow));
     }
/* 2312 */     if (statups.containsKey(MapleBuffStat.神奇圆环)) {
/* 2313 */       mplew.writeInt(player.getBuffedIntValue(MapleBuffStat.神奇圆环));
/* 2314 */       mplew.writeInt(0);
/* 2315 */       mplew.writeInt(0);
/* 2316 */       mplew.writeInt(0);
     }
/* 2318 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_VampDeath)) {
/* 2319 */       mplew.writeInt(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_VampDeath));
     }
/* 2321 */     if (statups.containsKey(MapleBuffStat.荣耀之翼)) {
/* 2322 */       mplew.writeInt(0);
/* 2323 */       mplew.writeInt(0);
     }
/* 2325 */     if (statups.containsKey(MapleBuffStat.祝福标记)) {
/* 2326 */       mplew.writeInt(0);
/* 2327 */       mplew.writeInt(0);
     }
/* 2329 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK542)) {
/* 2330 */       mplew.writeInt(0);
/* 2331 */       mplew.writeInt(0);
/* 2332 */       mplew.writeInt(0);
     }
/* 2334 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK584)) {
/* 2335 */       mplew.writeInt(0);
/* 2336 */       mplew.writeInt(0);
/* 2337 */       mplew.writeInt(0);
     }
/* 2339 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK589)) {
/* 2340 */       mplew.writeInt(0);
/* 2341 */       mplew.writeInt(0);
/* 2342 */       mplew.writeInt(0);
     }
/* 2344 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK591)) {
/* 2345 */       mplew.writeInt(0);
     }

/* 2348 */     PacketHelper.write剑刃之壁(mplew, player, player.getBuffSource(MapleBuffStat.剑刃之壁));
/* 2349 */     int n = isChrinfo ? Randomizer.nextInt() : 1;
/* 2350 */     if (statups.containsKey(MapleBuffStat.能量获得)) {
/* 2351 */       mplew.writeLong(Math.min(buffSource, 10000));
/* 2352 */       mplew.write(1);
/* 2353 */       mplew.writeInt(n);
     }
/* 2355 */     if (statups.containsKey(MapleBuffStat.疾驰速度)) {
/* 2356 */       mplew.writeZeroBytes(8);
/* 2357 */       mplew.write(1);
/* 2358 */       mplew.writeInt(n);
/* 2359 */       mplew.writeShort(0);
     }
/* 2361 */     if (statups.containsKey(MapleBuffStat.疾驰跳跃)) {
/* 2362 */       mplew.writeInt(0);
/* 2363 */       mplew.writeInt(0);
/* 2364 */       mplew.write(1);
/* 2365 */       mplew.writeInt(n);
/* 2366 */       mplew.writeShort(0);
     }
/* 2368 */     if (statups.containsKey(MapleBuffStat.骑兽技能)) {
       int buffSource2;
/* 2370 */       if ((buffSource2 = player.getBuffSource(MapleBuffStat.骑兽技能)) > 0) {

/* 2372 */         MaplePacketCreator.addMountId(mplew, player, buffSource2);
/* 2373 */         mplew.writeInt(buffSource2);
       } else {
/* 2375 */         mplew.writeLong(0L);
       }
/* 2377 */       mplew.write(1);
/* 2378 */       mplew.writeInt(n);
     }
/* 2380 */     if (statups.containsKey(MapleBuffStat.极速领域)) {
/* 2381 */       mplew.writeZeroBytes(8);
/* 2382 */       mplew.write(1);
/* 2383 */       mplew.writeInt(n);
     }
/* 2385 */     if (statups.containsKey(MapleBuffStat.导航辅助)) {
/* 2386 */       mplew.write(0);
/* 2387 */       mplew.writeInt(Randomizer.nextInt());
/* 2388 */       mplew.writeZeroBytes(10);
/* 2389 */       mplew.write(1);
/* 2390 */       mplew.writeInt(n);
     }
/* 2392 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_Undead)) {
/* 2393 */       mplew.writeZeroBytes(16);
/* 2394 */       mplew.write(1);
/* 2395 */       mplew.writeInt(n);
     }
/* 2397 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_RideVehicleExpire)) {
/* 2398 */       mplew.writeInt(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_RideVehicleExpire));
/* 2399 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_RideVehicleExpire));
/* 2400 */       mplew.writeShort((player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_RideVehicleExpire) > 0) ? 10 : 0);
/* 2401 */       mplew.write(1);
/* 2402 */       mplew.writeInt(n);
     }
/* 2404 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_COUNT_PLUS1)) {
/* 2405 */       mplew.writeInt(player.getBuffedIntValue(MapleBuffStat.SECONDARY_STAT_COUNT_PLUS1));
/* 2406 */       mplew.writeInt(player.getBuffSource(MapleBuffStat.SECONDARY_STAT_COUNT_PLUS1));
/* 2407 */       mplew.writeShort(0);
/* 2408 */       mplew.write(1);
/* 2409 */       mplew.writeInt(n);
     }
/* 2411 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK49)) {
/* 2412 */       mplew.writeInt(0);
/* 2413 */       mplew.writeShort(0);
     }
/* 2415 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK522)) {
/* 2416 */       mplew.writeInt(0);
     }
/* 2418 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_KeyDownMoving)) {
/* 2419 */       mplew.writeInt(0);
     }

/* 2422 */     if (statups.containsKey(MapleBuffStat.飞行骑乘)) {
       int buffSource3;
/* 2424 */       if ((buffSource3 = player.getBuffSource(MapleBuffStat.骑兽技能)) > 0) {

/* 2426 */         MaplePacketCreator.addMountId(mplew, player, buffSource3);
       } else {

/* 2429 */         mplew.writeInt(0);
       }
     }

/* 2433 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK560)) {
/* 2434 */       mplew.writeInt(0);
     }
/* 2436 */     if (statups.containsKey(MapleBuffStat.斗气集中)) {
/* 2437 */       mplew.writeInt(0);
     }

/* 2440 */     if (statups.containsKey(MapleBuffStat.SECONDARY_STAT_UNK600)) {
/* 2441 */       mplew.writeInt(0);
/* 2442 */       mplew.writeInt(0);
/* 2443 */       mplew.writeInt(0);
     }
/* 2445 */     mplew.write(0);
   }




   public static byte[] cancelBuff(List<MapleBuffStat> statups, MapleCharacter chr) {
/* 2452 */     log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
/* 2453 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/* 2455 */     mplew.writeShort(SendPacketOpcode.CANCEL_BUFF.getValue());
/* 2456 */     mplew.writeInt(0);
/* 2457 */     writeMask(mplew, statups);
/* 2458 */     for (MapleBuffStat mask : statups) {
/* 2459 */       if (mask.canStack()) {
/* 2460 */         List<SpecialBuffInfo> buffs = chr.getSpecialBuffInfo(mask);
/* 2461 */         mplew.writeInt(buffs.size());
/* 2462 */         for (SpecialBuffInfo info : buffs) {
/* 2463 */           mplew.writeInt(info.buffid);
/* 2464 */           mplew.writeLong(info.value);
/* 2465 */           mplew.writeInt(0);
/* 2466 */           mplew.writeInt(info.bufflength);
/* 2467 */           mplew.writeInt(0);
/* 2468 */           mplew.writeInt(0);
         }
       }
     }
/* 2472 */     if (statups.contains(MapleBuffStat.变身效果) || statups.contains(MapleBuffStat.移动速度) || statups.contains(MapleBuffStat.跳跃力) || statups.contains(MapleBuffStat.增加跳跃力) || statups.contains(MapleBuffStat.增加移动速度) || statups.contains(MapleBuffStat.冒险岛勇士) || statups.contains(MapleBuffStat.金属机甲) || statups.contains(MapleBuffStat.战法灵气) || statups.contains(MapleBuffStat.变形值) || statups.contains(MapleBuffStat.能量获得) || statups.contains(MapleBuffStat.疾驰速度) || statups.contains(MapleBuffStat.疾驰跳跃) || statups.contains(MapleBuffStat.飞行骑乘)) {
/* 2473 */       mplew.write(3);
/* 2474 */     } else if (statups.contains(MapleBuffStat.骑兽技能)) {
/* 2475 */       mplew.write(3);
/* 2476 */       mplew.write(1);
/* 2477 */     } else if (statups.contains(MapleBuffStat.月光转换) || statups.contains(MapleBuffStat.SECONDARY_STAT_KeyDownMoving)) {
/* 2478 */       mplew.write(0);
/* 2479 */     } else if (statups.contains(MapleBuffStat.飞翔)) {
/* 2480 */       mplew.write(6);
/* 2481 */     } else if (statups.contains(MapleBuffStat.飞翔)) {

     }
/* 2484 */     return mplew.getPacket();
   }




   public static byte[] cancelBuff(MapleBuffStat buffstat) {
/* 2491 */     log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
/* 2492 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/* 2494 */     mplew.writeShort(SendPacketOpcode.CANCEL_BUFF.getValue());
/* 2495 */     mplew.writeInt(0);
/* 2496 */     writeSingleMask(mplew, buffstat);
/* 2497 */     if (buffstat.canStack()) {
/* 2498 */       mplew.writeInt(0);
     }

/* 2501 */     return mplew.getPacket();
   }




   public static byte[] cancelDebuff(MapleDisease mask) {
/* 2508 */     log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
/* 2509 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/* 2511 */     mplew.writeShort(SendPacketOpcode.CANCEL_BUFF.getValue());
/* 2512 */     mplew.writeInt(0);
/* 2513 */     writeSingleMask(mplew, mask);
/* 2514 */     mplew.write(3);
/* 2515 */     mplew.write(0);
/* 2516 */     mplew.write(1);

/* 2518 */     return mplew.getPacket();
   }


   public static byte[] spawnArrowsTurret(MapleArrowsTurret summon) {
/* 2523 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/* 2525 */     mplew.writeShort(SendPacketOpcode.SPAWN_ARROWS_TURRET.getValue());
/* 2526 */     mplew.writeInt(summon.getObjectId());
/* 2527 */     mplew.writeInt(1);
/* 2528 */     mplew.writeInt(summon.getOwnerId());
/* 2529 */     mplew.writeInt(0);
/* 2530 */     mplew.write(0);
/* 2531 */     mplew.writeInt((summon.getPosition()).x);
/* 2532 */     mplew.writeInt((summon.getPosition()).y);
/* 2533 */     mplew.write(summon.getSide());

/* 2535 */     return mplew.getPacket();
   }

   public static byte[] isArrowsTurretAction(MapleArrowsTurret summon, boolean attack) {
/* 2539 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/* 2541 */     mplew.writeShort(attack ? SendPacketOpcode.ARROWS_TURRET_ACTION.getValue() : SendPacketOpcode.SPAWN_ARROWS_TURRET.getValue());
/* 2542 */     mplew.writeInt(summon.getObjectId());
/* 2543 */     mplew.writeInt(attack ? 0 : 1);
/* 2544 */     if (!attack) {
/* 2545 */       mplew.writeInt(summon.getOwnerId());
/* 2546 */       mplew.writeInt(0);
/* 2547 */       mplew.write(0);
/* 2548 */       mplew.writeInt((summon.getPosition()).x);
/* 2549 */       mplew.writeInt((summon.getPosition()).y);
/* 2550 */       mplew.write(summon.getSide());
     }

/* 2553 */     return mplew.getPacket();
   }


   public static byte[] ArrowsTurretAction(MapleArrowsTurret summon) {
/* 2558 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/* 2560 */     mplew.writeShort(SendPacketOpcode.ARROWS_TURRET_ACTION.getValue());
/* 2561 */     mplew.writeInt(summon.getObjectId());
/* 2562 */     mplew.writeInt(0);

/* 2564 */     return mplew.getPacket();
   }


   public static byte[] cancelArrowsTurret(MapleArrowsTurret summon) {
/* 2569 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/* 2571 */     mplew.writeShort(SendPacketOpcode.CANCEL_ARROWS_TURRET.getValue());
/* 2572 */     mplew.writeInt(1);
/* 2573 */     mplew.writeInt(summon.getObjectId());

/* 2575 */     return mplew.getPacket();
   }


   public static byte[] CannonPlateEffectFort(MapleCharacter from, short par1, short par2, short par3, byte dir, short Temporary1, short Temporary2, short Temporary3, int skillId, int DirPos1, int DirPos2) {
/* 2580 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/* 2582 */     mplew.writeShort(SendPacketOpcode.CANNON_PLATE.getValue());
/* 2583 */     mplew.writeShort(4);
/* 2584 */     mplew.writeInt(from.getId());
/* 2585 */     mplew.writeInt(from.getMapId());

/* 2587 */     mplew.writeShort(1);
/* 2588 */     mplew.write(0);

/* 2590 */     mplew.writeShort(par1);
/* 2591 */     mplew.writeShort(par2);
/* 2592 */     mplew.writeInt(par3);

/* 2594 */     mplew.writeShort(Temporary1);
/* 2595 */     mplew.writeShort(Temporary2);
/* 2596 */     mplew.writeShort(Temporary3);

/* 2598 */     mplew.write(0);
/* 2599 */     mplew.writeInt(0);
/* 2600 */     mplew.writeInt(skillId);

/* 2602 */     mplew.write(0);
/* 2603 */     mplew.writeInt(0);
/* 2604 */     mplew.writeInt(0);

/* 2606 */     mplew.write(dir);
/* 2607 */     mplew.writeInt((dir == 1) ? -DirPos1 : DirPos1);
/* 2608 */     mplew.writeInt(DirPos2);

/* 2610 */     return mplew.getPacket();
   }

   public static byte[] show念珠(int mode, int job, int count) {
/* 2614 */     log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
/* 2615 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/* 2617 */     mplew.writeShort(SendPacketOpcode.GIVE_BUFF.getValue());
/* 2618 */     mplew.writeInt(0);
/* 2619 */     mplew.writeInt(0);
/* 2620 */     if (mode == 1) {
/* 2621 */       writeSingleMask(mplew, MapleBuffStat.纯粹念力珠);
/* 2622 */     } else if (mode == 2) {
/* 2623 */       writeSingleMask(mplew, MapleBuffStat.火焰念力珠);
/* 2624 */     } else if (mode == 3) {
/* 2625 */       writeSingleMask(mplew, MapleBuffStat.疾风念力珠);
/* 2626 */     } else if (mode == 4) {
/* 2627 */       writeSingleMask(mplew, MapleBuffStat.深渊念力珠);
     }
/* 2629 */     mplew.writeShort(1);
/* 2630 */     mplew.writeInt(job);
/* 2631 */     mplew.writeInt(0);

/* 2633 */     mplew.writeZeroBytes(5);
/* 2634 */     mplew.writeInt(0);
/* 2635 */     mplew.writeInt(0);

/* 2637 */     mplew.writeInt(count);
/* 2638 */     mplew.writeInt(count);

/* 2640 */     mplew.writeInt(0);
/* 2641 */     mplew.write(0);
/* 2642 */     mplew.writeInt(0);

/* 2644 */     return mplew.getPacket();
   }


   public static byte[] switchLuckyMoney(boolean on) {
/* 2649 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/* 2651 */     mplew.writeShort(SendPacketOpcode.SWITCH_LUCKYMONEY.getValue());
/* 2652 */     mplew.writeBool(on);
/* 2653 */     return mplew.getPacket();
   }

   public static <E extends Buffstat> void writeSingleMask(MaplePacketLittleEndianWriter mplew, E statup) {
/* 2657 */     for (int i = 0; i < 33; i++) {
/* 2658 */       mplew.writeInt((i == statup.getPosition()) ? statup.getValue() : 0);
     }
   }

   public static <E extends Buffstat> void writeMask(MaplePacketLittleEndianWriter mplew, Collection<E> statups) {
/* 2663 */     int[] mask = new int[33];
/* 2664 */     for (Buffstat buffstat : statups) {
/* 2665 */       mask[buffstat.getPosition()] = mask[buffstat.getPosition()] | buffstat.getValue();
     }
/* 2667 */     for (int aMask : mask) {
/* 2668 */       mplew.writeInt(aMask);
     }
   }

   public static <E extends Buffstat> void writeBuffMask(MaplePacketLittleEndianWriter mplew, Collection<Pair<E, Integer>> statups) {
/* 2673 */     int[] mask = new int[33];
/* 2674 */     for (Pair<E, Integer> statup : statups) {
/* 2675 */       mask[((Buffstat)statup.left).getPosition()] = mask[((Buffstat)statup.left).getPosition()] | ((Buffstat)statup.left).getValue();
     }
/* 2677 */     for (int aMask : mask) {
/* 2678 */       mplew.writeInt(aMask);
     }
   }

   public static <E extends Buffstat> void writeBuffMask(MaplePacketLittleEndianWriter mplew, Map<E, Integer> statups) {
/* 2683 */     int[] mask = new int[33];







/* 2691 */     for (Buffstat buffstat : statups.keySet()) {
/* 2692 */       mask[buffstat.getPosition()] = mask[buffstat.getPosition()] | buffstat.getValue();
     }

/* 2695 */     for (int aMask : mask) {
/* 2696 */       mplew.writeInt(aMask);
     }
   }

   public static byte[] showFirewall(int oid, int skillid, Rectangle rectangle, int unk_value) {
/* 2701 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/* 2703 */     mplew.writeShort(SendPacketOpcode.SHOW_FIREWALL.getValue());
/* 2704 */     mplew.writeInt(oid);
/* 2705 */     mplew.writeInt(skillid);
/* 2706 */     mplew.writeInt(50 * Randomizer.rand(7, 9));
/* 2707 */     mplew.writeInt(rectangle.x);
/* 2708 */     mplew.writeInt(-rectangle.y);
/* 2709 */     mplew.writeInt(rectangle.x + rectangle.width);
/* 2710 */     mplew.writeInt(rectangle.y + rectangle.height - 22);

/* 2712 */     return mplew.getPacket();
   }

   public static byte[] showFirewall(int skillid, Rectangle rectangle) {
/* 2716 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/* 2718 */     mplew.writeShort(SendPacketOpcode.SHOW_FIREWALL.getValue());
/* 2719 */     mplew.writeInt(1);
/* 2720 */     mplew.writeInt(skillid);
/* 2721 */     mplew.writeInt(0);
/* 2722 */     mplew.writeRect(rectangle);

/* 2724 */     return mplew.getPacket();
   }

   public static byte[] giveGodBuff(int sourceid, int bufflength) {
/* 2728 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/* 2730 */     mplew.writeShort(SendPacketOpcode.GIVE_BUFF.getValue());
/* 2731 */     mplew.writeInt(0);
/* 2732 */     mplew.writeInt(0);
/* 2733 */     writeSingleMask(mplew, MapleBuffStat.无敌状态);
/* 2734 */     mplew.writeShort(1);
/* 2735 */     mplew.writeInt(sourceid);
/* 2736 */     mplew.writeInt(bufflength);
/* 2737 */     mplew.writeZeroBytes(18);
/* 2738 */     mplew.writeInt(0);
/* 2739 */     return mplew.getPacket();
   }




   public static byte[] updateDeformationCount(int job, int count) {
/* 2746 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/* 2748 */     mplew.writeShort(SendPacketOpcode.GIVE_BUFF.getValue());
/* 2749 */     mplew.writeInt(0);
/* 2750 */     mplew.writeInt(0);
/* 2751 */     writeSingleMask(mplew, MapleBuffStat.影魂异人蓄力);

/* 2753 */     mplew.writeShort(1);
/* 2754 */     mplew.writeInt(job);
/* 2755 */     mplew.writeInt(0);

/* 2757 */     mplew.writeZeroBytes(5);
/* 2758 */     mplew.writeInt(0);
/* 2759 */     mplew.writeInt(0);

/* 2761 */     mplew.writeInt(count);

/* 2763 */     mplew.writeInt(0);
/* 2764 */     mplew.write(0);
/* 2765 */     mplew.writeInt(0);

/* 2767 */     return mplew.getPacket();
   }





   public static byte[] showforceCon(int forceCon, int EXforceCon, int job, boolean external) {
/* 2775 */     log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
/* 2776 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/* 2778 */     mplew.writeShort(SendPacketOpcode.GIVE_BUFF.getValue());
/* 2779 */     mplew.writeInt(0);
/* 2780 */     mplew.writeInt(0);
/* 2781 */     Map<MapleBuffStat, Integer> statups = new EnumMap<>(MapleBuffStat.class);
/* 2782 */     statups.put(MapleBuffStat.SECONDARY_STAT_COUNT_PLUS1, Integer.valueOf(0));
/* 2783 */     if (external) {
/* 2784 */       statups.put(MapleBuffStat.上古指引, Integer.valueOf(-1));
     }
/* 2786 */     writeBuffMask(mplew, statups);
/* 2787 */     if (external) {
/* 2788 */       mplew.writeShort(-1);
/* 2789 */       mplew.writeInt(job);
/* 2790 */       mplew.writeInt(0);
     }
/* 2792 */     mplew.writeZeroBytes(5);
/* 2793 */     mplew.writeInt(0);
/* 2794 */     mplew.writeInt(0);

/* 2796 */     mplew.writeInt(forceCon);
/* 2797 */     mplew.writeInt(0);
/* 2798 */     mplew.write(0);
/* 2799 */     mplew.writeInt(0);
/* 2800 */     if (external) {
/* 2801 */       mplew.writeInt(0);
/* 2802 */       mplew.writeInt(EXforceCon);
     }
/* 2804 */     mplew.writeInt(0);
/* 2805 */     mplew.write(0);
/* 2806 */     mplew.writeInt(0);

/* 2808 */     return mplew.getPacket();
   }




   public static byte[] show纹样(int mode, int now) {
/* 2815 */     log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
/* 2816 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/* 2818 */     mplew.writeShort(SendPacketOpcode.GIVE_BUFF.getValue());
/* 2819 */     mplew.writeInt(0);
/* 2820 */     mplew.writeInt(0);
/* 2821 */     writeSingleMask(mplew, MapleBuffStat.万佛归一破_点数);
/* 2822 */     mplew.writeShort(mode);
/* 2823 */     mplew.writeInt(now);
/* 2824 */     mplew.writeInt(0);

/* 2826 */     mplew.writeZeroBytes(5);
/* 2827 */     mplew.writeInt(0);
/* 2828 */     mplew.writeInt(0);

/* 2830 */     mplew.writeInt(0);
/* 2831 */     mplew.write(0);
/* 2832 */     mplew.writeInt(0);

/* 2834 */     return mplew.getPacket();
   }




   public static byte[] UpdateRune(int count, int count2, int job) {
/* 2841 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/* 2843 */     mplew.writeShort(SendPacketOpcode.GIVE_BUFF.getValue());
/* 2844 */     mplew.writeInt(0);
/* 2845 */     mplew.writeInt(0);
/* 2846 */     writeSingleMask(mplew, MapleBuffStat.符文道力);

/* 2848 */     mplew.writeShort(count);
/* 2849 */     mplew.writeInt(job);
/* 2850 */     mplew.writeInt(0);

/* 2852 */     mplew.writeZeroBytes(5);
/* 2853 */     mplew.writeInt(0);
/* 2854 */     mplew.writeInt(0);

/* 2856 */     mplew.writeInt(count2);

/* 2858 */     mplew.writeInt(0);
/* 2859 */     mplew.write(0);
/* 2860 */     mplew.writeInt(0);

/* 2862 */     return mplew.getPacket();
   }




   public static byte[] UpdateRuneEffect(int day, int land, int man, int job) {
/* 2869 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/* 2871 */     mplew.writeShort(SendPacketOpcode.GIVE_BUFF.getValue());
/* 2872 */     mplew.writeInt(0);
/* 2873 */     mplew.writeInt(0);
/* 2874 */     writeSingleMask(mplew, MapleBuffStat.符文效果);

/* 2876 */     mplew.writeShort(day);
/* 2877 */     mplew.writeInt(job);
/* 2878 */     mplew.writeInt(0);

/* 2880 */     mplew.writeZeroBytes(5);
/* 2881 */     mplew.writeInt(0);
/* 2882 */     mplew.writeInt(0);

/* 2884 */     mplew.writeInt(land);
/* 2885 */     mplew.writeInt(man);

/* 2887 */     mplew.writeInt(0);
/* 2888 */     mplew.write(0);
/* 2889 */     mplew.writeInt(0);

/* 2891 */     return mplew.getPacket();
   }

   public static byte[] showCKZZ(int ckzz, int job) {
/* 2895 */     log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
/* 2896 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/* 2898 */     mplew.writeShort(SendPacketOpcode.GIVE_BUFF.getValue());
/* 2899 */     mplew.writeInt(0);
/* 2900 */     mplew.writeInt(0);
/* 2901 */     writeSingleMask(mplew, MapleBuffStat.苍空之子);
/* 2902 */     mplew.writeShort(ckzz);
/* 2903 */     mplew.writeInt(job);
/* 2904 */     mplew.writeInt(0);

/* 2906 */     mplew.writeZeroBytes(5);
/* 2907 */     mplew.writeInt(0);
/* 2908 */     mplew.writeInt(0);

/* 2910 */     mplew.writeInt(0);
/* 2911 */     mplew.write(0);
/* 2912 */     mplew.writeInt(0);
/* 2913 */     return mplew.getPacket();
   }
 }


/* Location:              C:\PGX\Server.jar!\tools\packet\BuffPacket.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */